View Single Post
  #7  
Old 09-26-2012, 03:36 PM
 
Pyro Pyro is offline
 

X-Adept
  
Join Date: Nov 2009
Posts: 506
 

Default Re: Customize invoice based on product purchased

Mike,

Thank you for the base that you provided. Could you please see where I am going wrong?

My scenario is that I want to display a certain message if a certain product is ordered.

As such, I have gone right to mail/html/order_invoice.tpl .


Here is the code that I am currently trying. The values in red are values that I have tried in with quotes and without quotes, but I get the same result either way.


Code:
{assign var="ordered8" value=0} {foreach from=$order.products item=product} {if $product.productid eq "8"} {assign var="ordered8" value=1} {/if} {/foreach} {if $ordered8 eq 1} extra thank you {else} no thank you for you {/if}





The output is always "no thank you for you", even if product 8 was ordered and is on the invoice.


Is there anything that you can see that I am missing?


Thank you very much for any guidance!
__________________
Best Wishes,
James

4.5.2 Gold (work in progress)
Reply With Quote