Skip to content

Instantly share code, notes, and snippets.

View ProxiBlue's full-sized avatar
🏠
Working from home

Lucas van Staden ProxiBlue

🏠
Working from home
View GitHub Profile
@ProxiBlue
ProxiBlue / rewrite non existing file
Last active August 29, 2015 14:04
Rewrite a non existing magento core class....
I found it is possible to do a rewrite on a core class that does not actually exist....
Usage case:
I am creating a reCaptcha module that integrates google recaptcha into magento's core captcha system.
In the core captcha you have the ability to state a 'type', as can be seen in the config.xml
of Mage_Captcha
<default>
......
@ProxiBlue
ProxiBlue / common_snapshot_configurationupdates
Created September 24, 2014 06:35
Comon / example snapshot configuration changes
<!-- Change unsecure base URL-->
<update>
<where>
<field><![CDATA[path]]></field>
<value><![CDATA[web/unsecure/base_url]]></value>
</where>
<set>
<field><![CDATA[value]]></field>
<value><![CDATA[{{base_url}}]]></value>
</set>
@ProxiBlue
ProxiBlue / Mage_Core_Exception
Created July 19, 2015 01:53
NewRelic Extension Block Blank Mage_Core_Model_Store_Exception pushes
<?php
/**
* This file is part of ProxiBlue NewRelic Module available via GitHub https://github.com/ProxiBlue/NewRelic
*
* ProxiBlue NewRelic Module is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
/**
* This code is part of ProxiBlue Free Gift Promotions
* It may be used/edited, freely, but this notice must remian intact.
*
/**
(function (a) {
function b() {
}
for (var c = "assert,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,markTimeline,profile,profileEnd,time,timeEnd,trace,warn".split(","), d; !!(d = c.pop());) {
Verifying that +proxiblue is my blockchain ID. https://onename.com/proxiblue
@ProxiBlue
ProxiBlue / fix-url-keys.php
Last active February 19, 2016 15:33 — forked from Vinai/fix-url-keys.php
This fixes the duplicate url_key issue in a Magento 1.8 / 1.13 installation.
<?php
/**
* Drop this into the shell directory in the Magento root and run with -h to see all options.
*/
require_once 'abstract.php';
/**
* Fix duplicate url keys for categories and products to work with the 1.8 alpha1 CE url key constraints.
@ProxiBlue
ProxiBlue / findAllBundlesWithSimple.php
Created May 20, 2016 03:28
Magento 1: Find All bundles that contain a simple
<?php
/*
* http://magento.stackexchange.com/questions/1354/how-to-find-all-bundle-products-that-contain-a-simple
*
*/
require_once '../shell/abstract.php';
class Mage_Shell_findProducts extends Mage_Shell_Abstract {
@ProxiBlue
ProxiBlue / varstosession
Created July 5, 2016 14:48
inject vars to session
protected $_paramsToTrack = array("offer_followup");
/**
* Capture any listened for parameters, and inject them into the session
* under a variable called : ProductOfferUrlParams
*
* You must clear this variable with a call to
*
* Mage::getSingleton('customer/session')->unsProductOfferUrlParams();
*
@ProxiBlue
ProxiBlue / gist:dfc74f35721b57e96b560d898cb6bfeb
Last active May 5, 2017 13:41
a script i run on any db to make it local dev ready
#!/bin/bash
n98-magerun --scope-id=0 config:set web/unsecure/base_url {{base_url}}
n98-magerun --scope-id=0 config:set web/secure/base_url {{base_url}}
n98-magerun --scope-id=1 --scope="stores" config:set web/unsecure/base_url {{base_url}}
n98-magerun --scope-id=1 --scope="stores" config:set web/secure/base_url {{base_url}}
n98-magerun --scope-id=1 --scope="stores" config:set web/unsecure/base_skin_url {{base_url}}/skin
n98-magerun --scope-id=1 --scope="stores" config:set web/secure/base_skin_url {{base_url}}/skin
n98-magerun --scope-id=0 config:set web/unsecure/base_skin_url {{base_url}}/skin
n98-magerun --scope-id=0 config:set web/secure/base_skin_url {{base_url}}/skin
@ProxiBlue
ProxiBlue / gist:bff88b184c9c0e44997ff6ae05468b01
Created January 27, 2018 09:10
ReCaptcha Email to a friend template with changes
<?php
/**
* Magento
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE_AFL.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php