Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Customer messages on invoices

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 09-13-2011, 05:32 PM
 
easyserve easyserve is offline
 

Member
  
Join Date: Jan 2008
Posts: 11
 

Default Customer messages on invoices

Hi all,

I use custom text fields on invoices to advise customers of news relating to that product. i need that news to appear on the actual invoice. the text fields require no input from customers. how do i delete the text boxes on invoices for certain products only?

to see mt currrent method go to: http://www.easyserve.com.au/product.php?productid=25185&cat=329&page=1.

Thanking you in advance.

Bill Zammit
__________________
X-Cart Pro v4.1.9 www.easyserve.com.au
Reply With Quote
  #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
  #3  
Old 09-14-2011, 04:55 PM
 
easyserve easyserve is offline
 

Member
  
Join Date: Jan 2008
Posts: 11
 

Default Re: Customer messages on invoices

Hi Mike,

thanks very much for taking the time and trouble to answer my question. i really appreciate the effort you went to. Bill
__________________
X-Cart Pro v4.1.9 www.easyserve.com.au
Reply With Quote
  #4  
Old 09-14-2011, 09:05 PM
  gb2world's Avatar 
gb2world gb2world is offline
 

X-Wizard
  
Join Date: May 2006
Location: Austin, TX
Posts: 1,970
 

Default Re: Customer messages on invoices

Alternatively, if you are happy with the way the options are displaying on your invoice, but just want to change the display on the product page, you can use webmastermode to find the template that displays the product options and look at the $product_options array. For your version - it is a little harder to look at smarty variables, but if you go to the extra trouble - it makes things like this much easier. See this tip.

There will be a loop to display all the options as inputs for the form. It will look something like this: {foreach from=$product_options item=v}

Then you could name your options something like "message1" and "message2"

You can put an if/than statement inside that loop and look at the class (option name) and displays the option text as you want. Something like:


{if $v.class eq "message1" || $v.class eq "message2"}
<!-- Here is the message -->
<p>{$v.classtext}</p>

{else}
... display options as normal as inputs for the form for all options with other option names
{/if}

---
__________________
X-CART (4.1.9,12/4.2.2-3/4.3.1-2/4.4.1-5)-Gold
(CDSEO, Altered-Cart On Sale, BCSE Preorder Backorder, QuickOrder, X-Payments, BCSE DPM Module)
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 10:14 PM.

   

 
X-Cart forums © 2001-2020