This topic has 15 replies, 3 voices, and was last updated 1 months, 1 weeks ago ago by Luca Rossi
Hello
I’ve set up a WooCommerce single product page where the product image opens in a lightbox when clicked. However, for variable products that have a variable gallery uploaded, the image does not open in the lightbox if a default variation option is selected.
When no default variation is set, the lightbox works as expected, but if a variation is selected and the product image is clicked, the lightbox no longer functions.
please check bellow url.
https://www.easyteezy.com/product/straw-hat-pirates-crew-t-shirt-one-piece-adventure-collection
Hello, @Chirag Modi,
Thank you for contacting us and for using XStore.
We kindly request that you provide us with access to your site’s WordPress admin panel through the private content area. This will allow us to review your settings and assist you more effectively.
Thank you for your cooperation.
Best regards,
The 8Theme Team
hi
please check I have provided admin access
Hello, @Chirag Modi,
Thank you for your prompt response.
We have temporarily activated the XStore parent theme on your website and did not encounter any issues. The lightbox feature is functioning correctly as expected.
It appears that the issue is being caused by custom code modifications within your child theme. To resolve this, we kindly recommend that you ask your website developer to review and address the additional code customizations in the child theme.
We hope this information is helpful. Should you need further assistance, please do not hesitate to reach out.
Best regards,
8Theme Team
Thank you for looking into this. However, there have been no customizations made to the child theme. Could you please check the code in the child theme? It remains exactly as it was provided by your team, without any modifications.
any update on this?
waiting for your reply
Hello, @Chirag Modi,
Thank you for your response.
You can view the result in your site’s customizer mode. To view the result on the front end of your site, this is likely due to the server cache (CDN) that is enabled on your site, as shown in the screenshot under private content area.
We suggest that you contact your hosting provider to flush the server cache and disable the CDN while you are in the development process.
If the changes you make in the Customizer are not reflected on the page, it is likely a caching issue. If the changes are visible in the Customizer, they should also be visible on the front end.
We recommend that you temporarily disable any CDN caching (server cache) and cache plugins, clear your browser cache, and then check again.
Best Regards,
8Theme’s Team
but if this issue if of CDN or caches, then why this is working when we activate parent theme and not working in child theme?
Hi @Chirag Modi,
Please add the following under functions.php file locates in your child theme:
remove_action( 'wp_footer', 'thumbnail_template_js' );
add_action( 'wp_footer', '_thumbnail_template_js' );
function _thumbnail_template_js() {
if ( !get_query_var( 'etheme_single_product_variation_gallery', false ) ) return;
global $post;
ob_start();
?>
<script type="text/html" id="tmpl-et-variation-gallery-thumbnail-template">
<li class="<?php echo get_query_var('etheme_single_product_vertical_slider', false) ? 'slick-slide' : 'swiper-slide'; ?> thumbnail-item" <?php echo get_query_var('etheme_single_product_vertical_slider', false) ? 'style="width: 100%;"' : ''; ?>>
<span data-elementor-open-lightbox="yes" data-elementor-lightbox-slideshow="all-slide-<?php echo $post->ID; ?>" href="{{data.url}}" data-small="{{data.src}}" data-large="{{data.full_src}}" data-width="{{data.full_src_w}}" data-height="{{data.full_src_h}}" class="pswp-additional pointer zoom" title="{{data.a_title}}">
<img class="{{data.thumbnail_class}}" width="{{data.thumbnail_src_w}}" height="{{data.thumbnail_src_h}}" src="{{data.thumbnail_src}}" alt="{{data.alt}}" title="{{data.title}}" />
</span>
</li>
</script>
<?php echo ob_get_clean();
}
Hope it helps!
have add this, but still facing same issue
FYI: I do cleared all caches
any update on this issue?
are you still looking into this issue??
Dear Chirag Modi,
We hope this message finds you well.
Apologies for the delayed response, as it was due to the weekend. We have made some adjustments to the custom code, and the lightbox feature is now functioning correctly.
You can view the updated result here: [Screenshot Link](https://www.awesomescreenshot.com/image/51063913?key=bd2cb34278af57b85085ff014637d261).
Could you kindly review it on your end and confirm if everything is working as expected?
Thank you for your time and cooperation.
Best regards,
The 8Theme Team
ok seems issue is resolved now,
can you please let me know what and where you have made changes?
Hi @Chirag Modi,
All the custom codes are under functions.php file locates in the child theme.
Best regards,
The 8Theme Team
You must be logged in to reply to this topic.Log in/Sign up