Set stored address as default for Shipping or Billing in Magento

A current project I’m working on with a client required to import 20k customers with address, contacts and profile data – a tricky task in itself. I managed it import this successfully, but noted that the addresses were set to Shipping and not Billing.  This meant that customers could not be searched or filtered from … Continued

Show product tiered pricing in category list in Magento

A recent client needed to bring the tiered pricing seen on the product page into their category list views. While there is a few approaches in this, the easiest method I found was to add this snippet to the desired location in /default/template/catalog/product/list.phtml

Magento: Fixing Cannot add or update a child row: a foreign key constraint fails

I’m currently completing a rather large project for a client. While I regularly make backups before installing any major extensions or conducting core work, yesterday I needed to make my first restore on this particular database. While Magento has a great tool for backups and restores, I always prefer to do it manually from either … Continued

Change default weight unit for FedEx shipping in Magento

If your store offers multiple shipping methods to your customers, it’s important to align all shippers to use the same unit for weight. This is becuase weight in Magento is not actually a particular unit. Weight to Magento is just a number, so theoretically, could be grams, kilograms, pounds, tonnes, you name it. Realistically, you … Continued

Check if homepage with PHP in Magento

This snippet wraps around your homepage-specific code in order to only display when on the homepage of your store. The ‘home’ identifier may be different for your site so amend as necessary.

Make Newsletter checked by default in Magento

So when shopping online, you may notice that when you purchase items or register an account, most of the time you will have an option to sign up to their mailing list. By default, these are normally set to subscribe by default. Magento for some reason, won’t have this set to subscribe users by default, … Continued

Show content in specific category in Magento

Here’s a little snippet which allows you to enter specific content based on store category. This is handy if you want to show something on a page which belongs to just a specific category only. Likewise you can show either content A if on category and if not, show content on all other categories: