View Single Post
  #10  
Old 09-26-2012, 06:54 PM
  totaltec's Avatar 
totaltec totaltec is offline
 

X-Guru
  
Join Date: Jan 2007
Location: Louisville, KY USA
Posts: 5,823
 

Default Re: Customize invoice based on product purchased

James, you are welcome. If you have a large volume of special messages then you should try to find a php solution, like assigning the message to each product in the db. Then you can just loop through the products and foreach output the products special message.

Let's just do it like this (untested psuedo code):
HTML Code:
{foreach from=$products item=product} {if $product.productid eq 8 or $product.productid eq 1 or $product.productid eq 7} {assign var=ordered8 value="You bought a boat!"} {/if} {if $product.productid eq 2 or $product.productid eq 3 or $product.productid eq 4} {assign var=ordered7 value="You bought some life jackets!"} {/if} {/foreach} {if $ordered8 ne '' and $ordered7 ne ''} You bought some life jackets and a boat! {elseif $ordered8 ne ''} {$ordered8} {elseif $ordered7 ne ''} {$ordered7} {else} Go get a boat, and some $*%# life jackets, loser! {/if}
Make sense?
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey

XcartGuru
X-cart Tutorials | X-cart 5 Tutorials

Check out the responsive template for X-cart.
Reply With Quote