4
votes

In the view catalog page I have added a custom select drop down. On selection of an option by the user the price should change accordingly. But as a option is chosen from the dropdown I am getting this error

TypeError: opConfig is undefined..

I have searched for this opConfig problem in Magento but didn't find a solution..

2
I flushed magento cache and cleared the cookies from browser and this worked for me though I still didn't understood the problem..It has something to do with varien.js.. - Nazim

2 Answers

1
votes

I found the cause of this issue.

In your themes equivalent of this path

/app/design/frontend/base/default/template/catalog/product/view/options.phtml

You'll see an empty line before the line Product.Options = Class.create();. Remove this empty line and the opConfig issue will be resolved.

0
votes

The question is not simple. in your view page find this line ( options.phtml )

 var opConfig = new Product.Options(...);

but your page has undefined error so there has 2 reason,

  1. javascript error in your product view page before opConfig.

  2. config not completly script in page.