Search code examples
javascriptmagentoprototypejs

Magento - Simple Configurable Products Extension


I'm using the Magento SCP extension to change various details on the product page when selecting an option in the configurable product.

I need to extend the functionality so that I can change the description, image etc when clicking on a thumbnail image instead of changing the list options.

As far as I can tell, the function that deals with the changing of product description etc is:

Product.Config.prototype.reloadPrice

I'm not sure how I can run this when I click on a thumbnail, what information do I need to pass to the function to run properly?


Solution

  • I figured it out in the end.

    When changing the dropdown values from clicking on an image elsewhere in the page I need to run the following code:

    spConfig.configureElement(element)
    

    Where (element) is the Dropdown's ID which I stored in a VAR further up the page.