Woocommerce single page image is not opening in light box

This topic has 15 replies, 3 voices, and was last updated 1 months, 1 weeks ago ago by Luca Rossi

  • Avatar: Chirag Modi
    Chirag Modi
    Participant
    October 10, 2024 at 11:21

    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

    14 Answers
    Avatar: Tony Rodriguez
    Tony Rodriguez
    Support staff
    October 10, 2024 at 11:49

    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

    Please contact administrator
    for this information.
    Avatar: Chirag Modi
    Chirag Modi
    Participant
    October 10, 2024 at 12:53

    hi
    please check I have provided admin access

    Please contact administrator
    for this information.
    Avatar: Tony Rodriguez
    Tony Rodriguez
    Support staff
    October 10, 2024 at 13:32

    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

    Avatar: Chirag Modi
    Chirag Modi
    Participant
    October 10, 2024 at 13:56

    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.

    Avatar: Chirag Modi
    Chirag Modi
    Participant
    October 11, 2024 at 05:49

    any update on this?
    waiting for your reply

    Avatar: Tony Rodriguez
    Tony Rodriguez
    Support staff
    October 11, 2024 at 05:53

    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

    Please contact administrator
    for this information.
    Avatar: Chirag Modi
    Chirag Modi
    Participant
    October 11, 2024 at 06:02

    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?

    Avatar: Justin
    Luca Rossi
    Support staff
    October 11, 2024 at 10:52

    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!

    Avatar: Chirag Modi
    Chirag Modi
    Participant
    October 11, 2024 at 11:05

    have add this, but still facing same issue

    FYI: I do cleared all caches

    Avatar: Chirag Modi
    Chirag Modi
    Participant
    October 11, 2024 at 14:02

    any update on this issue?

    Avatar: Chirag Modi
    Chirag Modi
    Participant
    October 12, 2024 at 07:11

    are you still looking into this issue??

    Avatar: Justin
    Luca Rossi
    Support staff
    October 14, 2024 at 06:44

    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

    Avatar: Chirag Modi
    Chirag Modi
    Participant
    October 14, 2024 at 15:45

    ok seems issue is resolved now,
    can you please let me know what and where you have made changes?

    Avatar: Justin
    Luca Rossi
    Support staff
    October 14, 2024 at 15:50

    Hi @Chirag Modi,

    All the custom codes are under functions.php file locates in the child theme.

    Best regards,
    The 8Theme Team

  • Viewing 15 results - 1 through 15 (of 15 total)

You must be logged in to reply to this topic.Log in/Sign up

8theme customization service
We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.