开发者

magento checkout: change shipping price

开发者 https://www.devze.com 2023-01-15 22:58 出处:网络
Scenario: Change shipping price using variable parsed by design during checkout. I need to change the final shipping price using some variables sent by phtml checkout.

Scenario: Change shipping price using variable parsed by design during checkout. I need to change the final shipping price using some variables sent by phtml checkout.

Eg.

Shipping method 1: cost 33$

Shipping method 2: cost 23$

Shipping method 3: cost 10$
     special packaging check开发者_JAVA技巧box (y/n) + 10$ (set it as yes for this example)
     assicuration:

I've inserted manually this checkbox, just in design but I need to increment final price and add a simple label that include this on shipment

total should be

shipment total                                    20$


In order to do this, you will need to write your own Shipping Module. There is a wiki article here with instructions, otherwise there are many good blog posts on the process. I would recommend that you use one of the existing Magento shipping modules (e.g. Mage_Shipping_Model_Carrier_Flatrate) as an example and then just extend the collectRates method to test for the value of your variable.

0

精彩评论

暂无评论...
验证码 换一张
取 消