Forums / Customization from the Admin / Adding Manufacturers_id to Invoice/packing Slip

Adding Manufacturers_id to Invoice/packing Slip

Views: 1,451

Results 1 to 4 of 4
25 Apr 2012, 2:07 PM
#1
nickycarroll avatar

nickycarroll

New Zenner

Join Date:
Oct 2009
Posts:
26
Plugin Contributions:
0

Adding Manufacturers_id to Invoice/packing Slip

I'd like to add manufacturers id onto the invoice/packing slip to create a unique product code along with the Product table product id. I've managed to add the product id bit, but have come unstuck with the manufacturers id as this is not in the orders table. Any suggestions?

      '        <td class="dataTableContent" valign="top" align="left">' . $order->products[$i]['id'] . '</td>' . "\n" .
25 Apr 2012, 2:12 PM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Adding Manufacturers_id to Invoice/packing Slip

You will need to do a look up on the manufactuers_id as it is not stored on the Order with something like:

$chk_manufacturers_id = zen_products_lookup($order->products[$i]['id'], 'manufacturers_id');

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

25 Apr 2012, 7:43 PM
#3
nickycarroll avatar

nickycarroll

New Zenner

Join Date:
Oct 2009
Posts:
26
Plugin Contributions:
0

Re: Adding Manufacturers_id to Invoice/packing Slip

Forgive me, but my knowledge is limited. I added the code you suggested and the following line for the input into the table on the invoice.php

            '        <td class="dataTableContent" valign="top" align="left">' . $products->manufacturers[$i]['id']. ''. "\n" .

Nothing showed up. Is the above correct?

25 Apr 2012, 9:44 PM
#4
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Adding Manufacturers_id to Invoice/packing Slip

That is because I suggest that you make a new variable:

$chk_manufacturers_id = zen_products_lookup($order->products[$i]['id'], 'manufacturers_id');

then use the variable $chk_manufacturers_id as this will have the Products manufacturers_id in it ...

I am not sure what you want to do with the manufacturers_id but it will now be in the variable:
$chk_manufacturers_id

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!