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

Add Payment Address to Invoice

 
Reply
   X-Cart forums > X-Cart 4 > Changing and adding new features
 
Thread Tools Search this Thread
  #1  
Old 02-23-2003, 08:22 AM
 
cloud9 cloud9 is offline
 

Advanced Member
  
Join Date: Dec 2002
Posts: 43
 

Default Add Payment Address to Invoice

One thing that seems to be left out of the X Cart is when the user selects a type of payment that needs to be sent to your company via regular mail, like a Money Order, there doesn't seem to be any special attempt to inform the buyer of where to send the payment.

One easy way I found to deal with this is to add some code to the Invoice template to display the mailing address for the payment. The Invoice template seems to be displayed after the user completes a purchase and is also sent to them via email.

Here is an example of how this can be done for Mail Orders. Just add the following code to the very end of the mail/order_data.tpl, this winds up at the end of the invoice...


/mail/order_data.tpl


Code:
{if $order.payment_method eq "Money Order"} Payment Address: ------------------------ {$config.Company.company_name} {$config.Company.location_address} {$config.Company.location_city}, {$config.Company.location_state} {$config.Company.location_zipcode} {/if}


You may need to play with the spaces and returns after pasting this in to get the layout you want.

Hope this is useful...
Reply With Quote
  #2  
Old 02-26-2003, 05:23 AM
 
Parrot Parrot is offline
 

eXpert
  
Join Date: Sep 2002
Location: MD USA
Posts: 350
 

Default

WOW GREAT!!!

Okay, I found to keep the 2nd and 3rd type of mail-in payment type from adding lots of spacing before adding the info, you have to keep the code one line after the other (no spaces before or after the {/if}) before adding the second type.

Note: I found the Traveler's Check option caused a parse error (v 3.3.2). I corrected this by deleting the ' in the name of the payment method and in the code here.

THANKS SO MUCH FOR POSTING THIS! IT WORKS BEAUTIFULLY!
__________________
Version: 4.4.2
Host: EWDhosting
Mods: BCSE
Reply With Quote
  #3  
Old 02-26-2003, 05:38 AM
 
cloud9 cloud9 is offline
 

Advanced Member
  
Join Date: Dec 2002
Posts: 43
 

Default

Yes, you can repeat the code with a different string, although the best way would be to have multiple conditions in the one If statement...

I'm not sure at the moment if the OR part is "or" or "||" but assuming the latter, it might be something like...

if $method eq "type1" || $method eq "type2" || $method eq "type3"
Reply With Quote
  #4  
Old 02-26-2003, 05:40 AM
 
Parrot Parrot is offline
 

eXpert
  
Join Date: Sep 2002
Location: MD USA
Posts: 350
 

Default

Ops... sorry... I deleted that part of my post since I figured out the answer right while you were posting.


I just repeated the code.
__________________
Version: 4.4.2
Host: EWDhosting
Mods: BCSE
Reply With Quote
  #5  
Old 03-01-2003, 08:25 PM
 
okdpminc okdpminc is offline
 

Advanced Member
  
Join Date: Nov 2002
Posts: 74
 

Default

Ok, so is the if $method eq "type1" || $method eq "type2" || $method eq "type3" correct, or should the || be OR?

Thanks for the snippit, cloud9!
__________________
- okdpm

X-Cart Gold Version: 3.5.1

Things are more like they are now than they have ever been before...
Reply With Quote
  #6  
Old 07-08-2003, 07:29 AM
 
toonarific toonarific is offline
 

Advanced Member
  
Join Date: Jul 2003
Posts: 92
 

Default

Where are the templates to alter the tag names for the payment methods?

Is there a snippet of code that can placed at the bottom of the onscreen invoice, depending on if it is a certain payment method type is selected, that will generate a print button to print out the invoice so it can be mailed in with the payment?
Reply With Quote
  #7  
Old 07-08-2003, 07:58 AM
  shan's Avatar 
shan shan is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Birmingham, UK
Posts: 6,163
 

Default

did this ever get added to the 3.4.3 version or earlier.

If not it should be
__________________
Looking for a reliable X-cart host ?
You wont go wrong with either of these.

EWD Hosting
Hands On Hosting
Reply With Quote
  #8  
Old 07-08-2003, 08:00 AM
 
toonarific toonarific is offline
 

Advanced Member
  
Join Date: Jul 2003
Posts: 92
 

Default

well, Im glad Im coming up with good ideas that needed to be added into the code. I just wish someone did something like this sooner so it would be ready for me
Reply With Quote
  #9  
Old 07-08-2003, 08:04 AM
  shan's Avatar 
shan shan is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Birmingham, UK
Posts: 6,163
 

Default

so thats a no then ? are you using V3.4.3

if you are and the codes not there contact xcart and ask them to add that snippet to the next release if you would
__________________
Looking for a reliable X-cart host ?
You wont go wrong with either of these.

EWD Hosting
Hands On Hosting
Reply With Quote
  #10  
Old 07-22-2003, 08:50 PM
 
cloud9 cloud9 is offline
 

Advanced Member
  
Join Date: Dec 2002
Posts: 43
 

Default

glad to help...
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Changing and adding new features


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 05:28 AM.

   

 
X-Cart forums © 2001-2020