Custom options changing product price to zero Magento 1.7

Thursday, 21. June 2012

After an upgrade to the latest version of Magento – time of writing 1.7, we noticed that the custom options selection was changing the price to zeros instead of updating them.

Turned out there was a bug in the options.phtml file of the current theme – and suprisingly on the base/default too.

To fix the problem

Locate the file: in app/design/[your package]/[your_theme]/template/catalog/product/view/options.phtml on around line 141

Then change

if (this.config[optionId][selectOption.value]) {
   price += parseFloat(this.config[optionId][selectOption.value]);


if (this.config[optionId][selectOption.value]) {
   price += parseFloat(this.config[optionId][selectOption.value].priceValue);


If your theme has this line instead

   price += parseFloat(this.config[optionId][element.getValue()]);

Change it to:

   price += parseFloat(config[optionId][element.getValue().price]);

Leave a Reply

You must be logged in to post a comment.