Drupal 和 Ubercart - 购买含税和不含税的产品
我正在开发一个在英国使用的电子商务网站,并被要求让用户购买含税或不含税的产品。
我稍微修改了 AAC 模块,以根据设置的 cookie 显示包含或不包含增值税的价格通过“查看价格,包括/不包括”链接,但当然,每当将产品添加到购物车时,价格都是数据库中的价格 - 即包括增值税。
有谁知道有什么巧妙的技巧或模块可以让我做到这一点?
I am developing an e-commerce site for use in the UK, and have been required to let the user buy products either with or without tax included.
I have slightly modified the AAC module to show prices either including or excluding VAT depending on a cookie which is set via a "view prices including/excluding" link, but of course whenever a product is added to cart, the price is that from the database - i.e. including VAT.
Does anyone know of any neat tricks or modules that would let me do this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我们决定只查看不含增值税的价格,而无法以不含增值税的价格购买。
如果有人需要它,这里是用于获取全价并计算出较低的不含增值税价格的代码/公式:
(我的版本中 uc_aac.module 的第 217-222 行 - 并且您将需要一个 div类别为“exclusion_VAT”)。
We've decided to go for just viewing prices excluding the vat, and not being able to buy them at the excluding vat price.
In case anyone needs it, here is the code/formula used to get the full price and work out the lower vat-free price:
(line 217-222 of uc_aac.module in my version - and you will need a div with the class "excluding_VAT").