Developer forum

Forum » Development » Current UnitId in Product Object

Current UnitId in Product Object

Dynamicweb Employee
Jeremy Fesmire
Reply

Hello,

 

We are trying to find a way to get the currently selected UnitId for a product for the product detail page, the product list page, and the cart.  When looking at the product object there is a DefaultUnitId, but I do not see any reference to the currently selected UnitId from the frontend. We are trying to add the select UoM to a Live Integration GetProductInfo request. For the product list page and the product detail page we are able to ge the UnitId from the Dynamicweb.context params, but this does not work in the cart which leads us to sending the DefaultUnitID regardless of what is selected.  

Is there a way to access the current select UnitId from the product object so that it can be referenced from any of the pages? 

 

Thanks,
Jeremy Fesmire


Replies

 
Nicolai Pedersen
Reply
This post has been marked as an answer

Hi Jeremy

Welcome to the forums, right?

The product object is a representation of the data in the database and does not have information on the selected unitid as that is a UI/client thing only. So in the cart, you have to look at the orderline that references the product - because the orderline holds the information on the selected unitid for that orderline.

BR Nicolai

Votes for this answer: 1

 

You must be logged in to post in the forum