Developer forum

Forum » Development » Hide product discount in cart

Hide product discount in cart


Reply
I want to hide the "product discount" in the showcart template.

I have a setup sort of like this:

productname    RRP Price    Discount    Price

product            100,00        10%        90,00

10%                -10,00                        -10,00
                                                                
Total                                                 90,00


But i don't want the discount to figure as a product. It should look like:

productname    RRP Price    Discount    Price

product            100,00        10%        90,00
                                                                
Total                                                 90,00

How do I hide the discount?

Replies

 
Nicolai Høeg Pedersen
Reply
You can use this tag:
http://templates.dynamicweb.dk/eCommerce/Dynamicweb-eCommerce-template-tags/Shopping-Cart/Order/Cart/Loops/Orderlines/EcomOrderOrderLine.Type.aspx

Ecom:Order:OrderLine.Type will return 1 on orderlines which are discounts.

And cheat like this:
.type1{
display:none;
}
<div class="type<!-- @Ecom:Order:OrderLine.Type -->">hide this</div>
 
Reply
Okay, that seems pretty "easy". But I can't get it to work.
Does it matter where in ShowCart template i put this string?:

<div class="type<!--@Ecom:Order:OrderLine.Type-->"> </div>


Actually i get this value from <!--@Ecom:Order:OrderLine.Type-->

ex.:
0 0 0 3 3
- 3 products (2 with discounts). The discounts give me the value 3


 
Nicolai Høeg Pedersen
Reply
It is in the orderlines loop.

But just use type 3 in the css.

.type3{
display:none;
}
 
Reply
Still no magic..

I've used:

.type3 {
display: none;
}

and passed the string right after <!--@LoopStart (OrderLines)-->

you can see the template right here:

http://textsnip.com/c3f1fb/html
 
Nicolai Høeg Pedersen
Reply
You have written like this in your template:

<div class="type<!-- @Ecom:Order:OrderLine.Type-->"></div>

<tr class="orderline<!-- @Ecom:Order:OrderLine.Type--> orderline">

You cannot have a div before the tr. But if you remove the div, and change your css to this:

.orderline3{
display:none;
}
 

 
Reply
There we have it. 

Thank you very much for helping out on this one :)

 

You must be logged in to post in the forum