| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Adding Manufacturer's name to Invoice/Receipt | |||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
Adding Manufacturer's name to Invoice/Receipt
Hello,
I want to add the "manufacturer" before "product" in the invoice/receipt. The field available in products is product.manufacturerid but that gives me a number. Not too helpful. I changed order.php on line 100 and added the following: $pids = func_query("SELECT $sql_tbl[order_details].itemid, $sql_tbl[order_details].productid, $sql_tbl[manufacturers].manufacturer,$sql_tbl[products].distribution FROM $sql_tbl[order_details], $sql_tbl[products] WHERE $sql_tbl[order_details].orderid = '$orderid' AND $sql_tbl[order_details].productid = $sql_tbl[products].productid AND $sql_tbl[products].distribution != '', $sql_tbl[manufacturers].manufacturer WHERE $sql_tbl[manufacturers].manufacturerid = $sql_tbl[products].manufacturerid"); In order_data.tpl I added: {$manufacturers.manufacturer} in front of {$product.product}. But this does not seem to do the trick. I must miss something somehow and hope someone can guide me in the right direction. Thanks in advance.
__________________
X-Cart 4.4.3 - Happily EWD Hosted - |
|||||||
#2
|
|||||||||
|
|||||||||
Re: Adding Manufacturer's name to Invoice/Receipt
Your sql statement is all wrong as well as the smarty code. I am suprised you are not getting an error actually. Don't even try this in order.php. I think manufacturer name is already included in product array but you need to call it properly in the template file
{$product.manufacturer}
__________________
Steve Stoyanov CFLSystems.com Web Development |
|||||||||
#3
|
|||||||
|
|||||||
Re: Adding Manufacturer's name to Invoice/Receipt
Unfortunately I have to disagree with your statement about the manufacturer being already in the array, as if it was I would not have posted here.
When printing an invoice/receipt from admin after order has been completed this variable is not available. The only one available is the $product.manufacturerid which returns a number when called.
__________________
X-Cart 4.4.3 - Happily EWD Hosted - |
|||||||
#4
|
|||||||||
|
|||||||||
Re: Adding Manufacturer's name to Invoice/Receipt
Ok. In include/func/func.order.php in this function
function func_order_data($orderid) just before $products = func_query("SELECT..... add // added by CFL Systems if (!empty($active_modules['Manufacturers'])) { $join .= " LEFT JOIN $sql_tbl[manufacturers] ON $sql_tbl[manufacturers].manufacturerid = $sql_tbl[products].manufacturerid"; $fields .= ", $sql_tbl[manufacturers].manufacturer"; } Then you can access it in the template as {$product.manufacturer}
__________________
Steve Stoyanov CFLSystems.com Web Development |
|||||||||
#5
|
|||||||
|
|||||||
Re: Adding Manufacturer's name to Invoice/Receipt
Thank you very much Steve!
Works perfectly... right out of the box Hope this will help more people as well. Philippe
__________________
X-Cart 4.4.3 - Happily EWD Hosted - |
|||||||
#6
|
|||||||
|
|||||||
Re: Adding Manufacturer's name to Invoice/Receipt
This works well for the html invoice. Unfortunately this information (product.manufacturer) does not export in the QB file using orders_export_qb. What addition would be needed to get this variable through and have it available in the final QB invoice?
I tried with {$orders[oid].product_manufacturer} and does not work. Thank you. Philippe
__________________
X-Cart 4.4.3 - Happily EWD Hosted - |
|||||||
#7
|
|||||||
|
|||||||
Re: Adding Manufacturer's name to Invoice/Receipt
Quote:
__________________
X-cart Platinum 4.6.0 |
|||||||
#8
|
|||||||||
|
|||||||||
Re: Adding Manufacturer's name to Invoice/Receipt
Make sure the code added doesn't have any broken words, the forum tends to break words with white spaces.
__________________
Steve Stoyanov CFLSystems.com Web Development |
|||||||||
|
|
|||
X-Cart forums © 2001-2020
|