Magento E-commerce Platform Q/ A

Ways to Enable or Add Custom Breadcrumbs in Magento

There are some pages in Magento with no breadcrumbs enabled by default. In order to enable it, for example, on the checkout page, open checkout.xml file stored in 'layout' folder of the current theme, and find there 'checkout_onepage_index' block.  Then add to the block this code:

How to Automatically Convert Simple Products to Bundle in Magento

The feature might be useful for the stores dealing with large and often updated inventory. In order not to convert each product manually after each inventory update to existing bundle products it is possible to make the process automated.

First we will create the observer that will be performing the function each time a new product is saved.

Announce the observer in config.xml file:

Custom Redirect from a Category Page in Magento

Let's assume your customer needs to redirect store users when they click on some category link to some particular product page. You can do it by creating a simple module. 

The structure of the etc/config.xml file:

How to Add a New Tab to a Category in Magento

To add a new magento category tab (manage categories page/ admin area), rewrite or simply copy the file from: core/Mage/Adminhtml/Block/Catalog/Category/Tabs.php to: local/Mage/Adminhtml/Block/Catalog/Category/Tabs.php.

Next in _prepareLayout method after this code:

$this->addTab(’products’, array( 
‘label’ => Mage::helper(’catalog’)->__(’Category Products’), 
‘content’ => $this->getLayout()->createBlock(’adminhtml/catalog_category_tab_product’, ‘category.product.grid’)->toHtml(), 
));

 

Add this one:

Custom Product Sorting Options in Magento

Frequently due to the variety of products available in the catalog it is necessary to add additional sorting options such as sort by brand or color. This is the example of how to add different sorting options to the products. In the below example sorting by products position depending on manufacturer attribute on the category page is shown.

Magento Tables Customization

We perform the actions with products table in the admin area, so make sure to override Mage_Adminhtml_Block_Catalog_Product_Grid block class. Class to override could be found here:

/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Grid.php

 

Secured method:  _prepareCollection delivers the products information and displays it in the table.

Magento: Custom Input Types in Custom Options

Magento by default supports about 10 input types for the product custom options. In order to create a custom one first of all it is necessary to add a possibility in Magento admin area to indicate this custom attribute:

File 'config.xml'