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)
-   -   Show manufacturer on Invoice (https://forum.x-cart.com/showthread.php?t=18111)

VTX 11-21-2005 04:31 AM

Show manufacturer on Invoice
 
Does anyone know how to show the manufacturer of the products on the invoice? I searched and found how to do it on the product details page, but I cant figure out what I need to do in order to get the manufacturer displayed on the invoice (after ordering & the email recieved).

VTX 11-22-2005 11:07 PM

Nobody knows how to do this? I would appreciate it very much :)

sundance 04-19-2006 03:20 PM

Here is a TOTALLY DIRTY way to show the Manufacturer Names on Invoices.

Apply this fix to:
/mail/html/order_data.tpl

You can place it where you want, but in this instance I have placed it just after
Code:

{foreach from=$products item=product}
<TR>
<TD align="center">{$product.productcode}</TD>
<TD><FONT style="FONT-SIZE: 11px">


so that the manufacturer name appears on the invoice with a comma, followed by the product name.

Code:

{* RG Add Manufacturer to Invoice Start *}
{php}
$manid=$this->_tpl_vars['product']['manufacturerid'] ;
      $productman= func_query_first_cell("select manufacturer from xcart_manufacturers where manufacturerid=$manid");
if ($productman!="") {
echo "
$productman, ";
}
{/php}
{* RG Add Manufacturer to Invoice End *}


These are the reasons this fix is BAD:

1. It is hardcoded PHP in a template
2. I have hardcoded the xcart table name (xcart_manufacturers) into the template - this may need to change depending on your table names.
3. There MUST be a more elegant way to do the database call than hardcoded here in the template like this, but necessity has forced me to produce this dirty fix instead.

This is the reason this fix is GOOD:

1. It works.

Hope this helps somebody.

Rob

fearnothing 03-23-2007 06:09 AM

Re: Show manufacturer on Invoice
 
Hey sundance - just in the process of moving over all my products to manufacturer based, and this tweak is exactly what I needed.

Thanks for sharing your knowledge - a 'dirty' fix it may be, but very effective indeed!

brocillator 11-05-2007 12:15 PM

Re: Show manufacturer on Invoice
 
does anybody know the xcart table name (xcart_manufacturers) in 4.1.8?

I can't find this in any files.

retrtrtrytrutru 07-30-2008 10:49 PM

Re: Show manufacturer on Invoice
 
This thread is old, I know but I am looking for the exact same fix. I need to include the manufacturer name on the order lines but I don't know how to do that. X-Cart v4.1.8. Anyone have a clue? Thanks!

pcparts 08-16-2008 05:00 PM

Re: Show manufacturer on Invoice
 
Try this skin1/mail/html/order_data.tpl

Around line 14 under
Code:

<th width="60" bgcolor="#cccccc">{$lng.lbl_sku}</th>

add
Code:

<th width="100" bgcolor="#cccccc">{$lng.lbl_manufacturer}</th>


Around line 27 under
Code:

<td align="center">{$product.productcode}</td>

add
Code:

<td align="center">{* RG Add Manufacturer to Invoice Start *}
{php}
$manid=$this->_tpl_vars['product']['manufacturerid'] ;
      $productman= func_query_first_cell("select manufacturer from xcart_manufacturers where manufacturerid=$manid");
if ($productman!="") {
echo "
$productman ";
}
{/php}
{* RG Add Manufacturer to Invoice End *}</td>



Then around line 74 Above

Code:

{$lng.lbl_gift_certificate}: {$gc.gcid}<br />

Add
Code:

<td nowrap="nowrap">

Greg


All times are GMT -8. The time now is 11:40 AM.

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