Developer forum

Forum » Ecommerce - Standard features » TotalProductQuantity gives 0 when 0,5 items in cart

TotalProductQuantity gives 0 when 0,5 items in cart

Aki Ruuskanen
Aki Ruuskanen
Reply

Hi,

I came across this little issue. 

If a user adds 0.5 products to the cart the tag TotalProductQuantity returns "0". The quantity of the orderline is correct ("0,5").

Regards / Aki


Replies

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply
This post has been marked as an answer

Yeah - it does:

Clearly a bug - but a breaking change if we fix it as is... 

But you can call this in your template: order.GetParentOrderLineQuantityCount(orderLines)

Votes for this answer: 1
 
Aki Ruuskanen
Aki Ruuskanen
Reply

Hi,

OK, thanks. Worked well. 

PS. Same thing with the Model version : Model.Cart.TotalProductsCount.ToString()

Regards / Aki

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

Yeah - the models TotalProductsCount property is a double so can work well.

 

You must be logged in to post in the forum