I want to import table rates automatically. What should I do?
First, you need to call this:
Mage::getModel('amtable/rate')->deleteBy($methodId);
OR
Amasty_Table_Model_Rate::deleteBy($methodId)
This will erase any data in the method.
And that is how you make import:
Mage::getModel('amtable/rate')->import($methodId, $fileName)
OR
Amasty_Table_Model_Rate::import($methodId, $fileName)
$methodId is Id of the method in Table Rates, and $fileName is the name of the csv file.
See more details on Shipping Table Rates page
How can we help you?
Login and Registration Form