Virtuemart - 添加到购物车,无价格
我正在尝试更改一些 Virtuemart 代码,以便我可以显示商品并将其添加到购物车,但没有价格。整个结账过程应该是相同的,但采购订单必须发送没有价格(更像是“报价”)。
这是我正在从事的项目的要求。我已经看到显示价格的操作直接附加到“添加到购物车”功能,因此如果有人可以建议一些有关如何分离这两个功能的提示,那将是一个很大的帮助。谢谢
I'm trying to change some of the Virtuemart code, so I can show items and add them to cart, but without prices. The whole checkout process should be the same, but the purchase order has to be sent without prices(more like a 'quote').
It is a requirement of a project I'm working on. I've already seen that the action of showing prices is directly attached to the 'add to cart' functionality, so If anyone can suggest some hint about how to separate these 2 functionalities it will be a great help. Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
为什么不删除在购物篮、结帐页面和订单电子邮件中显示价格的 HTML/PHP?
Why don't you just remove the HTML/PHP that displays the price in the basket, checkout page and in the order email?
更好的是,您可以使用 CSS 隐藏价格字段,这样您就不必接触任何代码或创建新的主题文件。它应该像将其添加到样式表一样简单 -
Better yet, you can use CSS to hide the price fields so you don't have to touch any of the code or create new theme files. It should be as easy as adding this to your stylesheet -
工作..你必须在components/com_virtuemart/themes/yourtheme中找到theme.css
我刚刚在最后添加了!important并且它工作了..span.productPrice
{display:none; !重要}
当然,这不会隐藏卡上的价格..但这是另一件事需要解决
Worked.. you have to find the theme.css in components/com_virtuemart/themes/yourtheme
I just added the !important in the end and it worked..
span.productPrice{display:none; !important}
Of course that doesn't hide the price from the card.. but that is another thing to be solved