Magento – Load Category by ID (in php)
<?php $_category = Mage::getModel(‘catalog/category’)->load(2); $_category_url = $_category->getUrl();
<?php $_category = Mage::getModel(‘catalog/category’)->load(2); $_category_url = $_category->getUrl();
<?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…
php -f shell/indexer.php reindexall
For this to work, you will need a USB drive (4gig or more) which is formatted to NTFS, I sacrificed my system restore USB… ouch. Now, the information on the page is pretty good -…
There are so many inspirational messages in this clip, it is hard to find enough words to summarise them. I’m not even going to try!
Nice and quick and simple, just replace the dodgy code with the right one. Also works with text strings: UPDATE catalog_product_entity_varchar SET value = REPLACE(value,’’,”)
Unfortunately the RWD theme contact form contains an invalid link on the post target of the form. Currently the link is: <form action=”<?php echo $this->getFormAction(); ?>” id=”contactForm” method=”post”> However, for the form to work correctly, you…
With jQuery you can watch for the error when the browser can’t find an image – then do what you want with it 🙂
Snippet: Simple form to pop up a google maps page with directions.