Developer forum

Forum » Templates » eCom Order line discount tags

eCom Order line discount tags


Reply

Which tag should I use in the shopping cart for displaying an order line's total after the discount has been subtracted?

 

I don't want to use the feature that displays the orderline's price before discount and the a new line displaying the discount.

 

In stead I want one line displaying the total price for that orderline.

 

So instead of this:

Ecom:Order:OrderLine.TotalPrice

I want something like:

Ecom:Order:OrderLine.TotalPrice.Discount.Price

 

- but I can't find a tag that handles the job!

 


Replies

 
Reply

A discount is registered on the order and not on the order line. That's why you can't find a tag for it.

 

I wrote this article a while ago describing how to get the order price before discount are calculated: http://developer.dynamicweb.dk/default.aspx?id=16918&action=ShowArticle&ArticleID=122

 
Reply
Sorensen wrote:

A discount is registered on the order and not on the order line. That's why you can't find a tag for it.

 

I wrote this article a while ago describing how to get the order price before discount are calculated: http://developer.dynamicweb.dk/default.aspx?id=16918&action=ShowArticle&ArticleID=122


Hi Lars

 

That doesn't really make sense. I can get the product price after discount is calculated and I can get the quantity in the order line loop - Then why can't I get a calculated order line total?

 

 
Reply

Do you mean the total price for x units of one particular product, or the total price for all order lines in an order?

 
Reply
Sorensen wrote:

Do you mean the total price for x units of one particular product, or the total price for all order lines in an order?


I mean the total price for x units of one particular product

 
Reply

It does make sense them. Sales discounts are applied to the order and not to individual order lines. So product prices work individually from discounts, but the order total amount is the sum of all order line totals, payment and shipping fees from which sales discounts are deducted.

 
Reply
Sorensen wrote:

It does make sense them. Sales discounts are applied to the order and not to individual order lines. So product prices work individually from discounts, but the order total amount is the sum of all order line totals, payment and shipping fees from which sales discounts are deducted.


I still think it would be useful to have a tag for each order line. To me it seems like a basic multiplication based on two values already present: the price for an item and the quantity.

 
Reply

Yes, that would be useful, but please pay good attention to what I'm saying. Discounts are not associated with order lines, so what would you expect that tag to contain?

 

There are a couple of articles that on working with discounts and bulk prices:

 

http://developer.dynamicweb.dk/Weblog-16918.aspx?action=ShowArticle&ArticleID=128

http://developer.dynamicweb.dk/Weblog-16918.aspx?action=ShowArticle&ArticleID=122

 

 

You must be logged in to post in the forum