Magento 在比较时配置产品
我想为 Magento 提供的比较功能添加一些功能。比较产品时,用户会看到“添加到购物车”按钮。此功能仅适用于简单的产品。当按下可配置或捆绑产品上的“添加到购物车”按钮时,用户将被重定向到比较视图之外的产品详细信息。
当用户可以在比较视图中配置产品时,这不是更好吗?!
你们知道有一个magento插件可以做到这一点吗?或者有想法如何在现有源代码中实现此功能?
I'd like to add some functionality to the comparing feature Magento offers. When comparing products, users are presented with an 'Add to cart' button. This feature only works well for simple products. When pressing the add to cart button on a configurable or bundled product the user is redirected to the product detail, out of the compare view.
Would it not be much better when a user could configure the products inside the compare view?!
Do you guys know of a magento plugin that does this trick? Or have ideas how this feature could be implemented in the existing source?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是我在开发 Magento 网站时时不时出现的问题。问题的要点是:处理可配置/捆绑/等产品的逻辑并不简单。为了处理这种复杂的逻辑而编写的 JS 代码的编写方式是无法容纳同一页面上的多个产品的。
因此,要做你想做的事,首先要做的就是大幅简化你的产品。复杂性的首要问题是处理多个可配置属性和更改定价等。之后,您需要重写可配置产品 JS 以正确设置提交表单。一旦您提交了正确的数据,您就应该非常安全了。
希望能给你一个提示!
谢谢,
乔
This is something that comes up from time to time as I develop Magento sites. The gist of the problem is this: the logic for dealing with configurable/bundle/etc products is not simple. The JS code that was written to handle this convoluted logic is written is such a way that multiple products on the same page cannot be accomodated.
So, to do what you want, the first thing to do is to simplify your products down significantly. The brunt of the complexity is dealing with multiple configurable attributes and changing pricing, etc. After that, you'll need to rewrite the configurable product JS to set up the submit form properly. Once you get the right data submitted, you should be pretty safe.
Hope that gives you a hint!
Thanks,
Joe