Magento code snippet showing the proper way to add an external Javascript or CSS file links to your Magento theme’s layout files without any additional files or extensions and without any direct template files hacks. This method is simple, easy and works every time.
Read moreJust a quick note this time on a great way to introduce tabs into the product edit page in the Magento Admin panel: via the
Fix for Multi Store View Bug in Magento
There is a pretty nasty bug in Magento if you are using multi store view with configurable products. I have recently patched it nicely with an extension that overrides the original controller method. This is a much nicer fix than actually hacking the core files which can then break in the next upgrade.
Read moreRetrieving the collection of enabled grouped products in Magento, programmatically. Also note that various options available.
Read moreBulk Copying Product Attributes in Magento
This static method can copy attributes between products in Magento very fast and relatively secure. We are bypassing the main Magento architecture and accessing the Database directly, but notice we are using the Zend framework for the db query and we still use DB transactions. It accepts the source product ID (not SKU), destination product ID, the array of attribute codes (‘size’, ‘color’, ‘name’, etc.), and the attribute type (‘varchar’, ‘int’, etc.).
Read moreIndexing and index processes were introduced in Magento since version 1.4.x. Here is how you can set one index to ‘REINDEX REQUIRED’ with code programmatically.
Read moreThis is a simple fix that makes a big difference. For some reason it is set to show up by default, however some websites that are sensitive to SEO or want to avoid this parameter so you do not get any weird values in Google Analytics or any other Analytics that you may be using, here is how to remove the ‘___from_store’ query string:
Read moreThis article contains code snippets for getting the base url for a specific magento store view in a multi store view setup. I also point out how to get the default baseurl for the current running store and what are the different types of base urls that you can retrieve at any given time.
Read more