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

Different Invoice Templates for Different Products

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 03-01-2007, 11:38 AM
 
detra detra is offline
 

Newbie
  
Join Date: Feb 2007
Posts: 5
 

Default Different Invoice Templates for Different Products

I am trying to figure out how I can use different invoice designs for different types of products. For example, I would like to sell a product offered by another department in our organization, but the contact information and logo need to be different.

I was thinking about creating a new order_invoice.tpl file with a new name that would use a different logo and contact information. But I am unsure how to call this invoice template for a specific product purchase. Perhaps it is called for all products in a specific category? Any help would be most appreciated! Thanks!
__________________
detra
Xcart version 4.0.19
Reply With Quote
  #2  
Old 03-01-2007, 12:05 PM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default Re: Different Invoice Templates for Different Products

Tough to do, as what happens when someone orders a 'regular' product and a 'special' product?
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #3  
Old 03-01-2007, 12:11 PM
 
detra detra is offline
 

Newbie
  
Join Date: Feb 2007
Posts: 5
 

Default Re: Different Invoice Templates for Different Products

Hmm. It seems like somewhere there would be a place for a simple "if" statement. If product category is X, then use the custom invoice design, otherwise use the standard design...

How does Xcart handle regular vs special products?
__________________
detra
Xcart version 4.0.19
Reply With Quote
  #4  
Old 03-01-2007, 12:14 PM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default Re: Different Invoice Templates for Different Products

Well I didn't mean 'special' literally...I just meant the one you wanted to create a special invoice for. My point is, if you have two different products in the cart, it is tough to get an {if} statement to work because one could be from one category, and one from another, so a simple {if $cat...} won't work.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #5  
Old 03-01-2007, 01:19 PM
 
detra detra is offline
 

Newbie
  
Join Date: Feb 2007
Posts: 5
 

Default Re: Different Invoice Templates for Different Products

In this case, I do not expect this "special" product to ever be combined with any other products...

Basically I am setting this up so that our conference center can process credit card payments for events they host. This category of "products" would only be visible to staff and would not be able to be added to a regular customer's cart.
__________________
detra
Xcart version 4.0.19
Reply With Quote
  #6  
Old 03-14-2007, 02:21 PM
 
detra detra is offline
 

Newbie
  
Join Date: Feb 2007
Posts: 5
 

Default Re: Different Invoice Templates for Different Products

I am looking to move forward with this plan, but if anyone has any insight on the code that would be much appreciated! I am looking to do the following:
  1. High level vision is to have a different designed invoice generated for a one specific product.
  2. This invoice would be different design and have different info than standard customer invoice.
  3. It would only be used for this one specific product, and this product will never be combined with any other products.
  4. So what I need is the if statement that says: "If product equals X, use a specific invoice template, otherwise use the standard invoice template", as well as some guidance about where to place it!
Basically, I am still working though understanding the chain of templates associated with an invoice, so any guidance about which tpl files I will need to update (or create second copies of) would be most appreciated.

Thanks!
__________________
detra
Xcart version 4.0.19
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design


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 03:54 PM.

   

 
X-Cart forums © 2001-2020