Developer forum

Forum » Rapido » Display the product units in the product page and shopping cart

Display the product units in the product page and shopping cart

Jon Thorne
Jon Thorne
Reply

Hi,

How do we display the product units in product page and shopping cart? There is a drop down displayed if we have variants or stock options with different units. But I would like to just display the default units as text if there are no variants. I have set the 'Units and stock' value in the 'Stock' section of the product. This is available via GetValue('DefaultUnitID') and refers to the VariantOptions list. This will work as long as I have no products that have multiple unit options. I would like to use GetLoop('StockUnits') or GetLoop('Units'). But they return no items.

Also the documentation refers to the 'DefaultUnitID' in this section which I assume is old?

(Ecommerce > Product Catalog > Product group/product > Unit tab > Units - Default)

Regards,

Jon.


Replies

 
Nicolai Pedersen
Reply
This post has been marked as an answer

Hi Jon

The default unit is meant to be used in combination with adding one or more unit and stock relations to the stock matrix. Then the default unit will control which one is chosen by default. So you have to use them in combination.

BR Nicolai

Votes for this answer: 1

 

You must be logged in to post in the forum