سؤال

I created a custom module, which act as a product view page for my bundle products. I have successfully displayed name, descriptions and options in my module. Now I am stuck in dynamic pricing section. I need to change the price of the bundle product dynamically, when check boxes of bundle product get clicked. How can I achieve this? Not that my module doesn't have any relation to the default product view page.

هل كانت مفيدة؟

المحلول

The same way the standard bundle product view page does it: with javascript. Note that the standard Magento template (bundle/catalog/product/price.phtml) is a bad example of how to do it. If you can do better, I applaud you. The crux is in js/varien/product.js, see the reloadPrice for starters.

But - don't make the same mistake of trying to parse the HTML. Load the data via json and work with that.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى magento.stackexchange
scroll top