如何隐藏“添加到购物车”按钮 Magento
这个问题似乎有点奇怪,但我想知道是否有一个简单的解决方案来隐藏“添加到购物车”按钮,因为我想显示没有任何内容的产品陈列室,“添加到购物车”按钮只会在用户事件之后出现(在这种情况下选择模块中的商店) 有什么好的技巧可以实现这一点吗?
现在我正在考虑如果用户检查了他将链接到哪个商店,则设置一个会话布尔变量,也许有更好的东西?
谢谢
the question seems a litle bit strange, but I wonder if there's an easy solution to hide the add to cart button cause I would like to display a showroom of the products without anything, the add to cart button will only appears after an user event (select a store in a module in that case)
any good tricks to realize that ?
For now I'm thinking a session boolean variable set if the user has check which store he'll be linked to, perhaps there's something better ?
Thx
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我现在很好奇这会是什么样子!如前所述,您可以将商店选择存储为 cookie 以提供一定的持久性,这样网站访问者就可以思考并反思购买行为,而不会在下次登录时陷入麻烦。
如果 cookie 不存在,您可以将其放在模板的末尾以隐藏按钮:
I am intrigued now as to how this is going to look! As mentioned earlier you can have your store selection stored as a cookie to give some persistence, in that way the site visitor can think and reflect about a purchase and not go through hoops next time they sign in.
If the cookie is not present you could put this in the end of your template to hide the buttons: