| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
If Statement for Invoices | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
![]() I have made a modification (addition) to currency.tpl. This is the template file that controls how prices are displayed. I only want that change to show up when you viewing products or a product. I do not want this change to show up on the invoices (emails).
My idea was to wrap my modification in an if statement that checks to see if this file is being called to create an invoice. i.e. {if $invoice eq true}. Is there any such variable that identifies this is an invoice not a product listing (or visa versa)? Thanks
__________________
Jed Herzog Gold X-Cart 4.0.17 http://www.outliersolutions.com Portland Advertising Agency, Portland Web Design |
|||||||
#2
|
|||||||
|
|||||||
![]() Quote:
so the best way to do this is to ask IF it's a product or catalog. try this: {if $main eq "product"} show the currency.tpl edit {/if} {if $main eq "catalog"} show the currency.tpl edit {/if} or use an else in there.... Helpful?
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4 |
|||||||
#3
|
|||||||
|
|||||||
![]() Thats great, I was so close I had the {if $main eq "product"} but did not know how to identify if it was a product list. If {if $main eq "catalog"} does that then this is exactly what I needed.
I ended up moving the mod out of currency.tpl and into customer/main/product.tpl and customer/main/products.tpl. That works. Sucks the mod is in two places but it got the job done and I can't afford to go back and try this suggestion. I really appreciate your help and suggestion. Thanks, Jed
__________________
Jed Herzog Gold X-Cart 4.0.17 http://www.outliersolutions.com Portland Advertising Agency, Portland Web Design |
|||||||
|
|||
X-Cart forums © 2001-2020
|