I’m trying to create an order outside Magento, my current problem is that I need to know the shipping tablerate cost before creating the order in Magento.
Any suggestions?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
There are 2 options:
Table rates are stored in
shipping_tableratetable. So knowing your calculation type (Magento table rates have 3 calculation variants) and order conditions (weight, price, destination, # of items) query database directly.You can create a quote object, add quote items and addresses and then run
Mage_Shipping_Model_Shipping::collectRatesByAddress.