I updated my Magento version to recently.

After updated to new version, if I select the price of the product, that cost is showing normally fine till here.

The main problem is if I select any option like color, size That product's price is showing ZERO.

  • 3
    Why You offer bounty if you already have an answer Nov 30, 2016 at 12:42

2 Answers 2


The code posted in the accepted answer cannot be found in a default Magento install.

Thus I'm pretty sure the issue can be caused by the JavaScript method called reloadPrice.

Interestingly, when checking the block that renders the attribute dropdown you can find this:

if (!$this->getSkipJsReloadPrice()) {
    $extraParams .= ' onchange="opConfig.reloadPrice()"';

I'm pretty sure you can set that parameter via layout XML by doing this:

    <reference name="product.info.options">
        <action method="setData">

I have found the solution for this issue. First of all, we need to go to this path

app/design/[your package]/[yourtheme]/template/catalog/product/view/options.phtml

Search for this script

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

Replace with

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

Now it is cleared.

  • I couldn't find this line. Aug 2, 2016 at 4:40
  • @user1240207, have you searched for price += parseFloat(config[optionId][element.getValue()]); ? Aug 3, 2016 at 4:49
  • Yes, definitely I did search for it in Aug 3, 2016 at 5:26
  • Okay, Can you share the code of your file at app/design/[your package]/[yourtheme]/template/catalog/product/view/options.phtml? Aug 3, 2016 at 5:37
  • 1
    @SyedIbrahim, please check once my answer. I added the path also. Or else, Please share the code from above path Apr 27, 2019 at 7:38

Your Answer

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

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