X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Different Invoice Templates for Different Products (https://forum.x-cart.com/showthread.php?t=29294)

detra 03-01-2007 11:38 AM

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!

balinor 03-01-2007 12:05 PM

Re: Different Invoice Templates for Different Products
 
Tough to do, as what happens when someone orders a 'regular' product and a 'special' product?

detra 03-01-2007 12:11 PM

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?

balinor 03-01-2007 12:14 PM

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.

detra 03-01-2007 01:19 PM

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 03-14-2007 02:21 PM

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!


All times are GMT -8. The time now is 04:31 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.