Jump to content

Include Supplier Reference in PDF Invoice


Recommended Posts

Hi Prestashoppers!!!

Something came up today that hopefully can be 'modificated' somewhat to work.

We use distribution centers across the globe to handle our orders and some use our product codes, which is fine, and some use there own system generated codes to handle their bins and shelves system.

It would be great to be able to use one of our redundant fields (Supplier reference, EAN13 or even Location) to enter the DC's product code which would print out on the PDF invoice and enable them to handle the orders much easier.

At the moment they are having to cross reference our product code against theirs which is causing delays.

Any ideas would be greatly appreciated!

Thanks

Dan

Link to comment
Share on other sites

I just checked the ps_order_detail table and it stores the product reference, EAN13 and supplier reference, so it is easy for you to use these in your PDF. I suggest using the supplier reference number and then using the following variable in the foreach loop in the ProdTab function in classes/PDF.pdf:

$product['product_supplier_reference']



You will need to mess around with the code to add a new column to the table for the supplier reference.

Link to comment
Share on other sites

Hi Rocky,

Thanks for that.

Ive managed to find the line of code that generates the Product Reference in the PDF file.

Line 634 of PDF.php

$this->Cell($w[++$i], $lineSize, $product['product_reference'], 'B')



And successfully changed it to 'product_supplier_reference' and it displays correctly.

I'm pretty stumped at the code used for the PDF and never really used PDF generation in PHP - how could i simply just put the new supplier_reference in the line somewhere or just beneath the reference.

Thanks

Dan

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...