In my code, this type of operation used to work inside the main-product.liquid file. However, apparently it stopped working. Before I used Dawn Theme 4 and now 6.
window.addEventListener('tomitVariantChanged', function(e){
 tomitInventoryFeatures.handleInventoryRender();
});
document.addEventListener('tomitProductLoaded', function(e) {
 tomitInventoryFeatures.handleInventoryRender();
});
Can this type of addEventListener operation take place inside main-product.liquid? In my case it called the function whenever I changed the product variant.
Hope someone can help me. Thanks!
             
            
              
              
              
            
            
           
          
            
            
              Hi,
I did a google search on the event “tomitProductLoaded” which is not a default supported event so my first guess is that you most likely had an additional javascript library reference in your theme. Are you aware of any such library that may have been referenced in your Dawn Theme 4? If any of the theme files were customized, this may not have carried over to your v6.
The search brought me to https://intercom.help/inventory-info/en/articles/6810871-developer-javascript-events Did you have an app that you used before with your previous theme version? Perhaps by JTC Apps or JTC Interactive?
Hope this gets you going in the right direction.
~ Didier
             
            
              
              
              1 Like
            
            
           
          
            
            
              It seems you are right. I believe that the plugin is no longer working as it used to with Dawn 4. It is still working, but apparently it no longer uses the aforementioned addEventListener.
Thanks for the help!
             
            
              
              
              1 Like