• Resolved ppalfingernill

    (@ppalfingernill)


    HI, I am creating a woocommerce shop, i managed to create two slick sliders which show the default image first and then the product images gallery. I created the same markup, so it works with the default woocommerce image change, but unfortunately, it only works for one slider, the other one doesn’t update the image. In the documentation, I couldn’t find anything helpful to how the image is updated when changing the color.

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Support Shameem R. a11n

    (@shameemreza)

    Hello @ppalfingernill

    WooCommerce uses a JavaScript event to update the image when the product variation changes. You mentioned that you have two sliders, but only one updates. It’s possible that the second slider isn’t correctly hooked into the event.

    You’ll need to ensure that both sliders are properly assigned to the event. Here’s a basic outline of how you can do this:

    1. Identify the JavaScript event that triggers the image change. This is typically found_variation in WooCommerce.
    2. Attach both sliders to this event. This can usually be done in your theme’s JavaScript file.
    3. Test to ensure both sliders update when the event is triggered.

    I hope this clarifies your concern. If you have any other questions, feel free to ask.

Viewing 1 replies (of 1 total)
  • The topic ‘Update both product images when color selection changes’ is closed to new replies.