Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Add New Fields to PDF Datasheet Maker


rubygirl

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 ...

 

thoughts?

 

thanks!

Link to comment
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:

$data_array[1]

 

Any Help would be great!

Link to comment
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

Link to comment
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:

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

 

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:

$data_array[14];

 

Does that make sense?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...