Magento:: How to Export Customer ID with Import/Export Profile

Posted by Damodar Bashyal on March 02, 2012

 

I was struggling to export Customer ID (entity_id) for some time. I thought it should be straight forward. But it wasn't, so after googling for a while I found this solution.

solution 1:

Override file: app\code\core\Mage\Customer\Model\Convert\Parser\Customer.php

and update function unparse();

previous:

$systemFields = array();
foreach ($this->getFields() as $code=>$node)
{
    if ($node->is('system'))
    {
	    $systemFields[] = $code;
    }
}

More»

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»