将装运计算移至总计块

编程入门 行业动态 更新时间:2024-10-27 10:34:33
本文介绍了将装运计算移至总计块的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

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

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:

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

github/integer-net/Autoshipping

更多推荐

将装运计算移至总计块

本文发布于:2023-10-30 22:20:09,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1544167.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:移至

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!