Magento Themes and Magento Extensions

Adding configurable product to cart using code in magento

Posted on October 31st, 2012 | Posted by admin

Adding configurable product to cart using code in magento

If you’ve ever wanted to add a configurable product to the cart using code, for example if a customer goes through a process of picking attributes that is different to a normal product view page, you may temporarily store these attributes and then post them across to a page that will pick them up. This page would then need to combine those options and add the configurable product, including these options, to the users cart.

Custom SEF Sidebar Navigation For Magento

Posted on October 30th, 2012 | Posted by admin

I wanted to share a quick snippet of code that I created for adding a custom navigation section to your Magento left column area. I currently created this navigation area for a client to replace the layered navigation. The layered navigation has a lot of great features and organization but probably better severs as a multi -select drop down. Also in the previous versions of Magento the layered navigation was not search engine friendly.

This is not currently the case but I still find that there is not enough control over the category / subcategory display within the layered navigation. This custom navigation block could be used above some of the other build in features such as price, manufacturer etc. that is simple to accomplish with the layered navigation.

Also of note, I have found including other SEO centralized developers, that the layered navigation simply refreshs that page, so should you have content on the main category page, the layered navigation link creates confusion becuase the page content continues to display.

Selective attribute sorting in magento

Posted on October 29th, 2012 | Posted by admin

When you have a large scale Magento store with thousands of products in every top-level category, dozens or even hundreds of offered filters for a single attribute in your layered navigation, certain necessities become mandatory – like selective attribute sorting. Even though Magento does offer sorting functionality for attribute values, in these situations that just might not be enough as you can not sort selectively for a specific category.

For instance, let’s say a customer is in a “First Category” and there he sees a brands attribute in layered navigation, filterable by these values:

A & A Specialties (1) Abella (2) Abex Friction Products (1) Absco Ltd (1) AC-Delco (166) Accel (1) Acco Ind (1) …

Then customer goes to a “Second Category” and again there is this brands attribute with exactly the same options offered to filter by.

Now, why wouldn’t you offer your customers filterable options in the order you find the most suitable, maybe boost sales by emphasizing a certain brand, or just sorted to be a bit more relevant to current category?

Create a Drop-Down of Countries in magento

Posted on October 27th, 2012 | Posted by admin

When I first needed to access a collection of countries in Magento I assumed it would work like all other data collections but was shocked to find that this wasn’t the case. Rather than store country data in the database, Magento stores country data in an XML file and loads it in on each request. Fortunately though, there are some simple functions that we can use to access country names and codes in Magento.


Posted on October 26th, 2012 | Posted by admin

About MagNotes Series
In this blog I have always shared about what I’ve learned on Magento, which I felt is taken me one step closer to understanding Magento and Magento development. But during the course of time, I bump on some elementary things which are absolutely required. So just for those elementary things I’ve decided to create a series (MagNotes Series) , for myself as a reference or for whoever think this is helpful.

// Get all the locale options
$locale = new Mage_Adminhtml_Model_System_Config_Source_Locale();
$localSource = $locale->toOptionArray();
// Change Options array to one dimentional array
$localSourceCodes = array();
foreach ($localSource as $source) {
$localSourceCodes [$source ['value']] = $source ['label'];
Page 1 of 712345»...Last »