Skip Navigation

[Resolved] WooCommerce gallery and zoom disappear when AJAX custom search filters are used

This support ticket is created 6 years, 11 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 2 replies, has 2 voices.

Last updated by Minesh 6 years, 11 months ago.

Assisted by: Minesh.

Author
Posts
#612602

Hello,

I just noticed that when I used my parametric search with AJAX updating, the WooCommerce product gallery and zoom functionality disappears.

hidden link

You can see this happening here.

Is there a way to make sure this functionality continues functioning after the parametric search filters are triggered.

Thanks!

#612610

I figured out the first part, and now my gallery functionality doesn't disappear:

jQuery( document ).on( 'js_event_wpv_parametric_search_results_updated', function( event, data ) {

	/**
	* data.view_unique_id (string) The View unique ID hash
	* data.layout (object) The jQuery object for the View layout wrapper
	*/

  jQuery( function( $ ) {
    /** Initialize all galleries on page. **/
    $( '.woocommerce-product-gallery' ).each( function() {
      $( this ).wc_product_gallery();
    });
  });

});

However, now my AJAX search doesn't cross fade when I change my filter entry.

I look forward to your reply.

Thanks!

#612641

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Yes - you've used correct view's Javascript callback hook to fix your issue.

Could you please tell me by example whats not working now? Maybe few screenshot will help me to understand your issue.