Developer forum

Forum » Development » Shopping Cart: Display Price before discount

Shopping Cart: Display Price before discount


Reply

 


Hoping someone can help me with this.


 


A customer would like the shopping cart shown in the following manner:


 


Article


Article


Article


Total Price (before discount)


----


Total price after discount


 


There does not seem to be a template tag which shows the full price before the discount, so I am attempting to use a templateExtender for this, with little success :)


 


Here is the code I am using; Order.Price.Price returns the price after the discount, and Order.SalesDiscount always returns 0.0


 



Public



Class SampleOrderTemplateExtenderInherits OrderTemplateExtenderPublic Overrides Sub ExtendTemplate(ByVal Template As Templatev2.Template, _ByVal RenderingState As TemplateExtenderRenderingState)Dim myPrice As Double = Order.Price.Price 'Price after discount

 


Dim myDiscount As Double = Order.SalesDiscount 'Dicount (is always 0.0)

 


Template.SetTag(


 


End


Dim myTotal As Double = myPrice + myDiscount"FullPrice", myTotal.ToString())End Sub Class

 


Here are two example images:


http://www.dynamicweb.nl/files/filer/NL_images/example.jpg


http://www.dynamicweb.nl/files/filer/NL_images/me.order.price.jpg


 



 


 


 


 


Replies

 
Reply

You're not the only one asking this question, so I wrote this small article and provided you with some code to get you started.

 

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

 

I hope you may find some use of it;)

 

You must be logged in to post in the forum