11 posts
  • Has been part of the Envato Community for over 4 years
  • Has collected 10+ items on Envato Market
  • Sells items exclusively on Envato Market
  • Located in Netherlands
WMTD says

Hi,

On my shop category pages and product page I would like to display what sizes we have available for each product. So let’s say I have 5 sizes: small, med, large, xl, xxl…

IF the product has all those sizes available I wanna say “5 sizes available” or “available in s, m, etc”.

IF the product only has m, l, xl available I wanna say “3 sizes available” or “available in m, l, xl”..

Can anybody point me in the right direction?

With <?php $subheadingvalues = get_the_terms( $product->id, 'pa_size'); foreach ( $subheadingvalues as $subheadingvalue ) { echo $subheadingvalue->name; } ?> I have been able to output all sizes that exist, but I wanna hide those that have no stock on said product…
103 posts
  • Has referred 1+ members
  • Has sold $10,000+ on Envato Market
  • Has collected 1+ items on Envato Market
  • Sells items exclusively on Envato Market
+1 more
WPShowCase says

It looks like you need to use variable products :-).

by
by
by
by
by
by