Changing Magento store email addresses in a local installation

Warning: Never execute these statements on a production system! The following query generates an update script according to a pattern you define. In this example the pattern is “your-domain.com”. Replace it with your own domain.

The resulting script might…

Session values cannot be read in Chrome or Internet Explorer (Magento 1)

Sometimes values stored in the session cannot be read again in Internet Explorer or Chrome.

Try the following workaround. Open System > Configuration > Web > Session Cookie Management > Use HTTP Only, then select Yes. Reading and writing…

Removing white borders around rectangular product images (Magento 1)

This is the standard code for resizing images:

If an image is rectangular, a white border appears around it. Sometimes that is undesirable. To change this behavior, use the following methods: constrainOnly(true) (prevents resizing images that are smaller than…

Sending parameters to a static block (Magento 1)

You have to use so called filters to send parameters to a static block from a template for example. Lets take a look at the following code: Thats the static Magento block:

We want to send attribute_set_name and product_id…

Making custom options available in quote in admin area (Magento 1)

Sometimes, when adding custom options to a quote in ther admin area, the custom options are not available. To avoid that problem, simply add the custom options to your modules config.xml, like this:

Getting a products view count programmatically (Magento 1)

Use the below code to figure out, how often a product was called in between 2 dates:

Getting selected custom options of a cart item (Magento 1)

Use the below code to figure out what custom option was selected by the customer for a cart item: