Jump to content
Sign in to follow this  

Add New Fields to PDF Datasheet Maker

Recommended Posts

hey all


does anyone have any suggestions on how to add new product fields to the pdf datasheet maker? I have added a number of new product fields - which all work fine - would just like them added to the pdf datasheet - currently all info prints on datasheet EXCEPT the new fields - i am guessing they go in the pdf datasheet functions file - but I have no idea how ...





Share this post

Link to post
Share on other sites

I too require assistance in this matter. I have a great deal of information on my products page, that i would like to have on my PDF datasheet.


It appears as though the information is loaded in data_arrays with an id number:



Any Help would be great!

Share this post

Link to post
Share on other sites

I've been able to find out what data arrays do what:


Array 2: Product Model

Array 3: Product Name

Array 4: Availability Date

Array 5: Manufacturer

Array 6: Product Description

Array 7: Tax Class

Array 8: Product Price

Array 9: Product Special Price

Array 10: Product Image

Share this post

Link to post
Share on other sites

okay through some trial and error I think I found an answer:


In the File pdf/pdf_datasheet_functions.php:


On line 517 you have the array:

$print_catalog_array = array(

'id' => $print_catalog['products_id'],

'name' => $print_catalog['products_name'],

'description' => $print_catalog['products_description'],

'model' => $print_catalog['products_model'],

'image' => $print_catalog[PDF_ALT_IMAGE],

'price' => $products_price,

'specials_price' => $specials_price,

'specials_expires' => $specials_expires,

'tax_class_id' => $print_catalog['products_tax_class_id'],

'status'=> $print_catalog['products_status'],

'date_added' => tep_date_long($print_catalog['products_date_added']),

'date_available' => tep_date_long($print_catalog['products_date_available']),

'manufacturer' => $print_catalog['manufacturers_name']);



add in your values there and follow suit:


'price' => $products_price,

//added new array 'your_array' => $print_catalog['your_array'],


(For the $print_catalog string it is being read from the query above it from the products table)


Then around line 554:



Add your Array to it:

$data_array=array($imagewidth,$imageheight,$model,$name,$date,$manufacturer,$description,$tax_class_id,$specials_price,$price,$imagepath,$specials_expires, $your_array);

(Here is where it gets tricky, the order in which you add your arrays here are the Array ID for your $data_array[id] call earlier in the script.


So if your array is the 14th in the list then your data array would be:



Does that make sense?

Share this post

Link to post
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
Sign in to follow this