Using the plugin on a SPA reloads the page when going to a single product page
-
Hi there!
I’m using this plugin on a site that uses a JS transition manager, meaning that the site doesn’t reload when navigating to different paths.
I noticed that the site reloads when navigating to a single product page from the product lists. I investigated the issue and I saw that this happens because of the ‘eventCallback’ on the:
“jQuery( document ).on( ‘click’, ‘.products li:not(.product-category) a:not(.add_to_cart_button):not(.quick-view-button),.products>div:not(.product-category) a:not(.add_to_cart_button):not(.quick-view-button),.widget-product-item,.woocommerce-grouped-product-list-item__label a'” event. This is when one uses the enhanced e-commerce.This code is alright and makes sense for traditional websites, but it breaks the normal flow of a SPA.
Will you consider making some changes for SPA sites since there are a lot developers developing sites in this way, using JS frameworks or transition libraries.
I guess at the moment I have to change the code by myself for my needs.
Thank you ??
- The topic ‘Using the plugin on a SPA reloads the page when going to a single product page’ is closed to new replies.