Skip to content

Instantly share code, notes, and snippets.

<?xml version="1.0" encoding="UTF-8"?>
<config>
<modules>
<Ip_Prohibited>
<active>true</active>
<codePool>local</codePool>
</Ip_Prohibited>
</modules>
</config>
<?xml version="1.0"?>
<config>
<modules>
<Ip_Prohibited>
<version>0.1.0</version>
</Ip_Prohibited>
</modules>
<global>
<models>
<prohibited>
<?php
class Ip_Prohibited_Model_Onepage extends Mage_Checkout_Model_Type_Onepage
{
protected $Restricted_Countries = array(
'GB', // Country Codes
'CA'
);
$last_update = get_option('twitter_feed_last_update', 0);
if(time() - $last_update > 86400){
require_once('TwitterAPIExchange.php');
$settings = array(
'oauth_access_token' => "PASTE_VALUE_HERE",
'oauth_access_token_secret' => "PASTE_VALUE_HERE",
'consumer_key' => "PASTE_VALUE_HERE",
'consumer_secret' => "PASTE_VALUE_HERE"
);
$fields = array(
@ryaan-anthony
ryaan-anthony / gist:6025038
Created July 17, 2013 22:15
Trigger event on mouseout
function addEvent(obj, evt, fn) {
if (obj.addEventListener) {
obj.addEventListener(evt, fn, false);
}
else if (obj.attachEvent) {
obj.attachEvent("on" + evt, fn);
}
}
<?php
/**
* Magento
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
$this->_data[$key] = $value;
<?php
/**
* Magento
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\dev>ipconfig
Windows IP Configuration
Ethernet adapter Local Area Connection:
@ryaan-anthony
ryaan-anthony / gist:6265393
Created August 19, 2013 02:46
Get all options for $attr
$options = Mage::getModel('eav/config')
->getAttribute('catalog_product', $attr)
->getSource()
->getAllOptions(false);