Skip to content

Instantly share code, notes, and snippets.

@redesigned
redesigned / .htaccess
Created June 18, 2013 14:31
WebFont CSS Deceleration (cross browser w/ local install or cached file preference) Note: #iefix line only needed for older versions of IE.
#Allow Cross Domain Fonts
<FilesMatch "\.(ttf|ttc|otf|eot|woff|svg)$">
<IfModule mod_headers.c>
Header set Access-Control-Allow-Origin "*"
</IfModule>
</FilesMatch>
@redesigned
redesigned / magento_create_category_attribute.php
Created June 18, 2013 13:42
Magento Create Category Attribute
// ## Note: If not in a module sql setup use the following 2 lines
require_once('app/Mage.php');
Mage::app()->setCurrentStore(Mage::getModel('core/store')->load(Mage_Core_Model_App::ADMIN_STORE_ID));
// ## Note: Setup the new category attribute
$installer = new Mage_Sales_Model_Mysql4_Setup;
$installer->startSetup();
$installer->addAttribute('catalog_category', 'additional_css', array(
'type' => 'text',
'backend' => '',
'frontend' => '',