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 / EE-TO-CE_Downgrade
Created March 9, 2015 02:10
Downgrade script for magento EE to CE
#!/bin/bash
#first param = db user, second param = db name
rm -rf app/code/core/Enterprise
rm -rf downloader/template/enterprise
rm -rf app/design/install/default/enterprise
rm -rf app/design/frontend/enterprise
rm -rf app/design/adminhtml/default/default/layout/enterprise
rm -rf app/design/adminhtml/default/default/template/enterprise
@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 / convertQuoteToOrder.php
Created May 20, 2016 03:27
Magento 1: Convert Quote to Order
<?php
/**
* Convert a quote to an order object
* Note Bundle items selections do not show
*
* @author Lucas van Staden
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
*
*/
@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 {
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Run with: vagrant up --provider=docker
# to get a dns entry for the docker machines use DNSGUARD
# docker run -d -v /var/run/docker.sock:/var/run/docker.sock --restart always --name dnsdockmain -p 172.17.42.1:53:53/udp tonistiigi/dnsdock -domain=".local.com" -nameserver="192.168.50.20:53"
#
# common usage: vagrant --name=magento up --provider=docker
require 'getoptlong'