Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Support Bayejid Ahmed

    (@bayejid00)

    Hi @senturiwebdesign,

    Thank you for your query. I have reviewed the product page and found that this product does not have any variation image against the size attribute. So, after selecting a variation and adding to cart, it can not find a variation image to show.

    You can show the default image on variation select after add to cart, just check the featured image option for both cases like the screenshot: https://ibb.co/tD37Nsq.

    After this, let us know if it works or not.

    Af

    Thread Starter senturiwebdesign

    (@senturiwebdesign)

    Hi Bayejid,

    Thanks for your reply. Yes it works like this, however, I would like the gallery + navigation arrows to stay visible when clicking a variation, also after adding to cart.

    Is that possible?

    Kind Regards,
    Stijn

    Plugin Support Bayejid Ahmed

    (@bayejid00)

    Hi @senturiwebdesign,

    If your product has multiple variation images (more than one) against a variation then it will show the variation images with navigation and it is as usual.

    If there is an image then the navigation will not show. So, add multiple images in your product gallery and variation image field and variation gallery field.

    To show the default gallery on select of a variation and after adding to cart, keep the variation image field empty and set the sider setup like the screenshot and add the line of code in your current theme’s funtions.php file like the screenshot.

    add_filter( 'sp_woo_gallery_slider_use_slug_attr', '__return_false' );

    Let us know if it works or not.

    Plugin Support Bayejid Ahmed

    (@bayejid00)

    Hi @senturiwebdesign,

    This thread has been inactive for a bit, so I’m going to mark it as Resolved now. Please feel free to open a new one if you have any further questions.

    Cheers!

    Hi – there
    Just installed the plugin.
    I’m noticing something similar to above.
    Note it happens on select the variation.
    I’m not sure about on add to cart, because I return to category page on add to cart.

    With a variable product, I have one variation image per variation (colour).
    (or zero images if the only attribute is size and there is no problem in this case).

    I tried you code snippet above but it didn’t fix the issue.
    Is there another way to retain the default gallery where there isn’t a variation gallery?
    Perhaps that should be the default behaviour of the plugin?

    Plugin Support Bayejid Ahmed

    (@bayejid00)

    @pete4mask

    In the latest version, if any variation has no image, after adding to the cart of that variation, it shows the default featured image.

    After adding to the cart the variation remains selected by default of the WooCommerce feature and so the Gallery Slider plugin shows the image(s) of that variation (screenshot).

    However, we keep the way (by using the hook)

    add_filter( 'sp_woo_gallery_slider_use_slug_attr', '__return_false' );

    to show the default gallery in this case if the user expects it.

    Share the page link to review so that we can provide you a proper solution.

    Hi there

    Note I refer to just making a selection, before adding to cart.
    If you want to see another image you would need to make a different selection and you could only see images from the gallery which are used as a variation image.

    So a gallery image which is not associated to a variation is lost from view after a variation is selected.

    Example https://www.maskaustralia.com.au/product/gripgrab-sock-sl-lightweight/

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Single product gallery disappears when adding product to cart’ is closed to new replies.