Magento Table rate: How to customise/override?

Posted by Damodar Bashyal on February 27, 2012

 

Our client is using table rate shipping method but he needed slightly modification on the default one. They want to set shipping price on the product level (optionally). So, if shipping is defined for the product then use that to calculate shipping of the order.

If the product is set as 'free' then exclude it's price from shipping. If it's left empty or set as 'default' then just use the rate from table. But if the product has custom shipping price, then add that on the shipping.

This is how I modified the magento's official table rate shipping module/extension.

First of all, go to Magento admin / Catalog / Attributes / Manage Attributes and add new attribute with Attribute code 'tn_table_rate' with input type 'Text Field' and label 'Shipping Cost'. Then add it to your Attribute Set.

More»

Magento - How to add new image upload field in Manage Categories

Posted by Damodar Bashyal on February 23, 2012

 

I needed an extra image field for a category so that i can use image uploaded there as background image on that category page. So, that clients can have special backgrounds on festive seasons and other special events.

Here I am just going to show how to add new field quickly and easily without breaking anything.

First login to PHPmyadmin and select the database. Then run below sql code and take a note of inserted ID, 969 was in my case.

More»

How to add custom options to a product in magento.

Posted by Damodar Bashyal on February 05, 2012

 

Adding custom options to a product automatically while importing CSV in Magento is quite easy after all.

extend this file: app\code\core\Mage\Catalog\Model\Convert\Adapter\Product.php

look for: public function saveRow(array $importData)

Look for this:

if (!$attribute) {
    continue;
}

More»