On my product page, i want customers to see different colour tshirts, by clicking on button and they should be able to navigate through different colours.
This is my store link, go on product page
On my product page, i want customers to see different colour tshirts, by clicking on button and they should be able to navigate through different colours.
This is my store link, go on product page
Hi @Vishavjit ,
Thank you for reaching out to the Community! I’d be happy to provide some assistance with this request, to ensure it gets resolved. To confirm I’m fully understanding, are you looking to have color swatches appear on your product pages?
If so, I recommend checking out the Shopify App Store. We have various apps available that may allow you to achieve this. For ease, I’ve gone ahead and made a few suggestions listed below that you can look into:
Additionally, I’d also recommend getting in touch with the app developers directly to confirm an app’s capabilities. They will be able to provide more information and determine whether or not the app will fit your shop’s needs. To get in contact with an app developer, you can head to the Shopify App Store and select Support > Send A Message.
Please let me know if you have any other questions or concerns.
To allow customers to navigate through different colors of a T-shirt on your product page, you can use JavaScript or a JavaScript library like jQuery to achieve the desired functionality. Here’s an example of how you can implement it:
$(document).ready(function() {
var images = $('#product-images img');
var switchButton = $('#color-switch-btn');
var currentImageIndex = 0;
switchButton.click(function() {
currentImageIndex++;
if (currentImageIndex >= images.length) {
currentImageIndex = 0;
}
images.hide();
$(images[currentImageIndex]).show();
});
});
Hey, where should i add this code? can you help me with this also seems like you have hard coded three colours in here: red, blue, green. what if i only have other colour options