将装运计算移至总计块 [英] Moving the Shipping Calculation to the Totals Block

查看:53
本文介绍了将装运计算移至总计块的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们需要将装运计算块移至总计块.

We have a requirement to move the shipping calculation block to the totals block.

基本上,当购物车页面加载时,我们有2个选项:

Basically we have 2 options when the cart page loads up:

1)设置好运费后,请正常显示运费.2)未设置运送时,请出示html和表格以发布运送请求.

1) When shipping is set, present the shipping rate normally. 2) When shipping is not set, present the html and form to post a shipping request.

问题是,在没有运费的情况下,totals块内的运费块不呈现,因此我们将运费计算的html移到了totals块内.问题在于,在发货之前就显示了营业税,这显然是不正确的.

Issue is, the shipping block inside the totals block is not rendered when there is no shipping price so we moved the html of the shipping calculation inside the totals block. Problem with that is, that the sales tax is shown BEFORE the shipping which obviously is incorrect.

据我所知,我们唯一的选择是创建一个新的总计块,例如"calculate_shipping",并仅在没有运费的情况下调用它.该总计块将没有真正的总计"值,而只有带有表单发布的裸HTML.

As far as I see it, the only option we have is to create a new total block, for instance "calculate_shipping" and call it only when there is no shipping rate. This total block will have no real "total" value but just bare HTML with the form post.

您的想法和建议受到赞赏.我希望有更好的方法.

Your thoughts and suggestions are appreciated. I'm hoping there is a better way.

推荐答案

有一些模块可能会有所帮助:

There are a couple of modules out there that might help:

http://www.rapidcommerce.eu/blog/2012/04/allways-show-shipping-costs-in-magento/

https://github.com/integer-net/Autoshipping

这篇关于将装运计算移至总计块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆