| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Customer messages on invoices | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
![]() 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 |
|||||||
#2
|
|||||||||
|
|||||||||
![]() 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. |
|||||||||
#3
|
|||||||
|
|||||||
![]() 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 |
|||||||
#4
|
|||||||||
|
|||||||||
![]() 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) |
|||||||||
|
|||
X-Cart forums © 2001-2020
|