Skip to content

Add Customer Fields to Registration

  • by

Easy one! Modify your local.xml file, adding the following directly after <layout>   <customer_account_create> <reference name=”customer_form_register”> <action method=”setData”><key>show_address_fields</key><value>1</value></action> </reference> </customer_account_create>

1.9 Observable Events Magento

Mage/Persistent/Model/Observer.php: ‘persistent_session_expired’ Mage/Persistent/controllers/IndexController.php: ‘persistent_session_expired’ Mage/Rss/Block/Catalog/Review.php: ‘rss_catalog_review_collection_select’, array(‘collection’ => $collection) Mage/Rss/Block/Catalog/Special.php: ‘rss_catalog_special_xml_callback’, $args Mage/Rss/Block/Catalog/NotifyStock.php: ‘rss_catalog_notify_stock_collection_select’, array(‘collection’ => $collection) Mage/Rss/Block/Catalog/New.php: ‘rss_catalog_new_xml_callback’, $args Mage/Rss/Block/Catalog/Category.php: ‘rss_catalog_category_xml_callback’, $args Mage/Rss/Block/Catalog/Tag.php: ‘rss_catalog_tagged_item_xml_callback’, $args Mage/Rss/Block/Wishlist.php: ‘rss_wishlist_xml_callback’, $args Mage/Rss/Block/Order/New.php: ‘rss_order_new_collection_select’, array(‘collection’ => $collection) Mage/CatalogRule/Model/Action/Index/Refresh.php:… 1.9 Observable Events Magento

Load Product by SKU or ID

  • by

<?php $_product = Mage::getModel(‘catalog/product’)->load(5525); $_product = Mage::getModel(‘catalog/product’)->loadByAttribute(‘sku’,’hypnotherapy-cd-weightloss’);

Reindex via Php script (Magento)

  • by

<?php // clear cache Mage::app()->removeCache(‘catalog_rules_dirty’); // Reindex prices Mage::getModel(‘index/process’)->load(2)->reindexEverything(); /* You can reindex specific items as below: 1 = Product Attributes 2 = Product Attributes 3 = Catalog URL Rewrites 4 = Product Flat Data… Reindex via Php script (Magento)

Hide or Replace Missing Images

  • by

With jQuery you can watch for the error when the browser can’t find an image – then do what you want with it 🙂

s2Member®