In my magento store my products have several custom options which alter the price of the product. I also need to add in a custom function which shows or hides particular content when this event triggers.

I can see that the following is called when any option ever changes:


but i am unsure what file this actually sits in so i can add an extra function onto the event.

2 Answers 2


mine is defined in confiugrable.js and looks something like:

reloadPrice: function(){
    if (this.config.disablePriceReload) {
    var price    = 0;
    var oldPrice = 0;
    for(var i=this.settings.length-1;i>=0;i--){
        var selected = this.settings[i].options[this.settings[i].selectedIndex];
            price    += parseFloat(selected.config.price);
            oldPrice += parseFloat(selected.config.oldPrice);

    optionsPrice.changePrice('config', {'price': price, 'oldPrice': oldPrice});

    return price;

        $('product-price-'+this.config.productId).innerHTML = price;

I have an issue with the Magento changePrice function. The price is calculating correctly when sent to the console, but once it is passed to the changePrice function it is no longer correct.

optionsPrice.changePrice('bundle', this.price.toFixed(2));

I cannot find any documentation on this function.

else if (this.findRush ) {
    // If Rush
    this.price = this.finalPrice;       
    console.log("this.price= " +  this.price);
    // Send Price to Pricing Objects
    optionsPrice.changePrice('bundle', this.price.toFixed(2));

Here is the site and a product example: https://www.envelopeink.com/sun-yellow-1423. If you select these options

  • fixed Quantity > 50 QTY
  • Printed envelopes
  • rush this order option on last step

The price should be 206.35 as seen in the console, but $247.95 is returned.

Any help on this would be greatly appreciated.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.