Skip to content

Instantly share code, notes, and snippets.

View davidalexander's full-sized avatar

David Alexander davidalexander

View GitHub Profile
@davidalexander
davidalexander / admin_reset.sql
Created September 9, 2014 16:58
Magento Admin gives 404 due to admin website not having id of 0
SET FOREIGN_KEY_CHECKS=0;
UPDATE `core_store` SET store_id = 0 WHERE code='admin';
UPDATE `core_store_group` SET group_id = 0 WHERE name='Default';
UPDATE `core_website` SET website_id = 0 WHERE code='admin';
UPDATE `customer_group` SET customer_group_id = 0 WHERE customer_group_code='NOT LOGGED IN';
SET FOREIGN_KEY_CHECKS=1;
@davidalexander
davidalexander / magento_trigger_500.php
Last active August 29, 2015 14:10
trigger magento 500 error
<?php
// Trigger 500 response
// allows styling of "There has been an error processing your request" page
// note setIsDeveloperModes should be false to prevent xxception being thrown
throw new Exception('you shall not pass');
@davidalexander
davidalexander / speedcurveAlert.php
Created July 25, 2018 10:11
A script to get the commit message and use it as the note to trigger a speedcurve deploy (magento 1)
<?php
class Skywire_Speedcurve_Alert extends Mage_Shell_Abstract
{
const GIT_COMMIT_API = 'https://api.github.com/repos/%s/%s/git/commits/%s';
const SPEEDCURVE_API = 'https://api.speedcurve.com/v1/deploys';
protected $hash;
@davidalexander
davidalexander / readme.md
Created January 4, 2021 12:21
Skywire / m2-module-linked-products

m2-module-linked-products

Link products to each other with user configurable types.

Installation

Install via composer

composer require skywire/linkedproducts