39

I have upgrade magento 1.9.2.4 to 1.9.3.

I am facing the following error in the console in product page.

TypeError: Product.OptionsPrice is not a constructor

var optionsPrice = new Product.OptionsPrice([]);
Raphael at Digital Pianism
  • 70,385
  • 34
  • 188
  • 352
Denish Vachhani
  • 4,562
  • 3
  • 16
  • 47

1 Answers1

101

It's caused by your custom theme not adding the new product_options.js file.

Edit your theme layout file (either local.xml or catalog.xml) and add the following under the <catalog_product_view> handle (or whatever page handle you're having the problem on):

<action method="addJs"><script>varien/product_options.js</script></action>
Raphael at Digital Pianism
  • 70,385
  • 34
  • 188
  • 352
  • 7
    To fix this issue on category listing page also add the js under catalog_category_default handle – Tahir Yasin Oct 18 '16 at 22:27
  • 3
    This JS is added in the 3 page layout handles, so make sure to add it under all these layout handles catalog_product_view , catalog_product_send , catalog_product_compare_index in catalog.xml inside your theme layout folder if this JS is found missing – Haijerome Feb 15 '17 at 05:19
  • Same issue i had faced when i upgrade Magento version 1.8.1 to 1.9.3.7 – Sourav Feb 03 '18 at 04:06
  • 1
    @Raphael at Digital Pianism why you don't use <reference name="head">? – LucScu Mar 08 '18 at 15:58