Issue with Extra Swatch Display in Variable Products
-
Hello,
I’m using the WoodMart theme and have set the “Number of visible swatches on grid” to 2 in the Shop Settings > Variable Product section. However, when a product has 3 variations, instead of showing a “+1” indicator for the extra variation, the third swatch is displayed. For products with 4 or more variations, the extra count (e.g. “+2”, “+3”) displays correctly.
I would like the behavior to be modified so that if there is one extra variation (3 in total), it shows “+1” instead of displaying the third swatch. Could you please advise on how to resolve this issue or provide a patch/fix for it?
Thank you for your assistance.
Best regards,
Mehmet
Hello,
First and foremost, this option was originally intended to ensure that swatches always remain in a single row when the client is simply browsing products. In our opinion, if the number of swatches exceeds the set limit by just one, displaying “+1” doesn’t make sense because it takes up the same amount of space as the hidden swatch. However, if this behavior doesn’t suit your needs, you can add the following code to the child theme, and it will work as required.
add_filter('woodmart_show_more_limit_swatches_count', '__return_zero');
Kind Regards
Hello,
It worked! Thank you Luke.
Regards,
Mehmet
Hello,
In case you need any additional help, I’d be more than happy to assist you.
Have a good day!
Kind Regards
The topic ‘Issue with Extra Swatch Display in Variable Products’ is closed to new replies.