View Single Post
  #2  
Old 09-14-2011, 06:39 AM
  totaltec's Avatar 
totaltec totaltec is offline
 

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

Default Re: Customer messages on invoices

This is probably not the most elegant solution, but here is an overview of how I would code this:

Create a new checkbox on the product details page, something like
Is ticket? []

This checkbox will need a value of Y if checked, and a new field in the product table of the db to hold the value.

Then in your product details template file you can check if this product is a ticket with an if statement,
{if $product.is_ticket = 'Y'}{include file="customer/main/is_ticket.tpl"}{/if}
and then if it is it will display a custom template file that you create with the message inside. It could just display a language variable actually.

If you need the message to change for each ticket product you sell, you can create another field on the product page that stores the message.

You can then use an if statement on the invoice as well to display the message.

There may be other steps required but this should help you understand how I would do it.
__________________
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