Category

Magento Code Snippets

How to Check for HTTPS in Magento phtml Files?

By | Magento Code Snippets | No Comments

These days our eCommerce pages are littered with third party social bookmarking tools, social media tools, facebook like buttons, add this buttons, and third party marketing scripts. It is easy to lose track of the most basic aspect of your shopping carts’ security: valid HTTPS pages. Here is a quick way to isolate all of these third party utilities and simply avoid using them in the HTTPS pages:

Read More

Bulk Copying Product Attributes in Magento

By | Magento Code Snippets | No Comments

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 More

How to Avoid the ‘___from_store’ Query Parameter When Switching Store Views in Magento

By | Magento Code Snippets | No Comments

This 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 More