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

What are Net Sales? How to Calculate Your Net Sales?

In the world of business, understanding financial metrics is crucial for making informed decisions and…

1 day ago

Magento 2 Extensions Digest April 2024 (New Release & Updates)

Welcome to the MageComp Monthly Digest, where we bring you the latest updates, releases, and…

1 day ago

The ABCs of Geofencing: Definition, Features and Uses

In this era, businesses are always on the lookout for ways to engage with their…

2 days ago

How to Delete Product Variant in a Shopify Remix App using GraphQL Mutations?

Managing a Shopify store efficiently involves keeping your product catalog organized. This includes removing outdated…

3 days ago

6 Innovative Tools Revolutionizing E-Commerce Operations

E-commerce has transformed the way consumers shop for products and services and interact with businesses.…

5 days ago

How Upcoming Cookie Changes Will Affect Your E-commerce Website?

The e-commerce world is constantly in flux. New tech and strategies emerge daily to help…

5 days ago