Developer forum

Forum » Development » How to get OrderLine.TotalPrice from programmatic OrderLine instance?

How to get OrderLine.TotalPrice from programmatic OrderLine instance?


Reply

Hey,

 

I have an question regarding the <!--@Ecom:Order:OrderLine.TotalPrice--> tag. I have an OrderLine object in which I declare the currency, quantity and unitprice (and other default properties). It all works as it should, but I am not able to pull the estimated total price of the orderline, giving me 0.00 instead of the result. 

 

I have tried using a PriceInfo object and the SetUnitPrice(), but with same result.

 

UPDATE 09/7: If I try to increment the amount of an orderline in the basket, it works as it was supposed to.

 

What I am missing? Any ideas how to fix this? Is it a bug or am I missing something at my orderline object?

 

- Allan Iversen

 

 

 


Replies

 
Reply
ai@co3.dk wrote:

Hey,

 

I have an question regarding the <!--@Ecom:Order:OrderLine.TotalPrice--> tag. I have an OrderLine object in which I declare the currency, quantity and unitprice (and other default properties). It all works as it should, but I am not able to pull the estimated total price of the orderline, giving me 0.00 instead of the result. 

 

I have tried using a PriceInfo object and the SetUnitPrice(), but with same result.

 

UPDATE 09/7: If I try to increment the amount of an orderline in the basket, it works as it was supposed to.

 

What I am missing? Any ideas how to fix this? Is it a bug or am I missing something at my orderline object?

 

- Allan Iversen

 

 

 

Is the OrderLine.Order property set to an Order and is that Order.IsCart property set to true? The orderline only calculates the total price (quantity * unitprice) when the order is still a cart.
 

 

You must be logged in to post in the forum