Jump to content

Edit History

Ray UK

Ray UK

Hi,

Im trying to find a variable to count the number of different attributes of a product.

(Not the qty of attributes )

i.e.,  if my product had options red, yellow, blue with 10 of each colour in stock, the value I'm after is 3.

This is to add back one of the most basic parts on any ecommerce site, the "Add to cart" button on the product listing.

I need this variable instead of using {if $product.id_product_attribute > 0} because some products will have 1 attribute (i.e. colour) and I need it so that it still filters in the faceted search module.

Also, a qty of the default attribute would be handy to show an "Out of stock" button if the qty is 0

Thanks in advance

Ray UK

Ray UK

Hi,

Im trying to find a variable to count the number of different attributes of a product.

(Not the qty of attributes )

i.e.,  if my product had options red, yellow, blue with 10 of each colour in stock, the value I'm after is 3.

This is to add back one of the most basic parts on any ecommerce site, the "Add to cart" button on the product listing.

I need this variable instead of using {if $product.id_product_attribute > 0} because some products will have 1 attribute (i.e. colour) and I need it so that it still filters in the faceted search module.

Thanks in advance

×
×
  • Create New...