![]() |
If Statement for Invoices
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 |
Re: If Statement for Invoices
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? |
Re: If Statement for Invoices
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 |
All times are GMT -8. The time now is 08:43 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.