Categories: GeneralHow To

Solved: “TypeError: opConfig is undefined” Error After Magento Upgrade

Upgrading Magento on regular basis not only brings new features and better UI but also security fixes which is vital part of your store security. While working with our clients’ projects for Magento Upgrade Service, we have found a JavaScript error with configurable products and swatches called “TypeError: opConfig is undefined”.

The error results in no changes of price while selecting custom options or configurable products. This is a major problem must be solved for proper working of products in upgraded Magento version.

Here, I have come with the simple solution to solve the error in minutes:

Find the file app/design/frontend/theme_package/layout/catalog.xml, search for related tags, if found, replace the head tag with following code. If not paste the below code in the file.


            
            
            




  
            
            
            
        



  
            
            
            
        
</catalog_product_compare_index >


 
           
            
            
        



 
            
            
        

Find another file app/design/frontend/theme_package/layout/catalogsearch.xml and again find tag mentioned below, if found, replace head tag or paste whole code as shown.

 
            
            
            
        

Save the file and voila! The error gets solved immediately.

Hope this simple solution might have saved your time and helped you while upgrading Magento. Let me know if you are stuck with issue, I’ll always be there to help.

Till then, Happy Upgrading!

Click to rate this post!
[Total: 1 Average: 5]
Dhiren Vasoya

Dhiren Vasoya is a Director and Co-founder at MageComp, Passionate ?️ Certified Magento Developer?‍?. He has more than 9 years of experience in Magento Development and completed 850+ projects to solve the most important E-commerce challenges. He is fond❤️ of coding and if he is not busy developing then you can find him at the cricket ground, hitting boundaries.?

Recent Posts

How to Add Tooltip in Checkout Shipping Field in Magento 2?

Hello Magento Friends, In today’s blog, I will explain How to Add Tooltip in Checkout…

2 days ago

How to Integrate and Use MongoDB with Laravel?

MongoDB is a popular NoSQL database that offers flexibility and scalability when handling modern web…

3 days ago

NodeJS | Callback Function

In NodeJS, callbacks empower developers to execute asynchronous operations like reading files, handling requests, and…

4 days ago

How to Show SKU in Order Summary in Magento 2?

Hello Magento Friends, In today’s blog, we will learn How to Show SKU in Order…

6 days ago

Best Colors to Use for CTA Buttons

The "Buy Now" and "Add to Cart" buttons serve as the primary call-to-action (CTA) elements…

1 week ago

Magento 2: How to Save Custom Field Value to quote_address for Multi-Shipping Orders

Hello Magento Friends, In Magento 2, the checkout process allows customers to choose multiple shipping…

1 week ago