开发者

Magento configure a product while comparing

开发者 https://www.devze.com 2023-02-17 23:01 出处:网络
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 produc

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开发者_如何学Python 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?


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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号