For anyone wondering this is how you can output the data from the products_extra_fields contribution to the pdf file.
Note: I am new to php so bear that in mind.
Firstly add the following to pdf_catalog.php (I added it at line 426 so it would apear under the model):
?//include product_extra_fields
?if(SHOW_PRODUCTS_EXTRA_FIELDS)
?{
?$extra_fields_query = tep_db_query("
?SELECT pef.products_extra_fields_name as name, ptf.products_extra_fields_value as value
?FROM ". TABLE_PRODUCTS_EXTRA_FIELDS ." pef
?LEFT JOIN ?". TABLE_PRODUCTS_TO_PRODUCTS_EXTRA_FIELDS ." ptf
?ON ptf.products_extra_fields_id=pef.products_extra_fields_id
?WHERE ptf.products_id=".$data_array[10]."
?ORDER BY products_extra_fields_order");
?while ($extra_fields = tep_db_fetch_array($extra_fields_query)) {
? if ($extra_fields['value'] != '') {
? ?$line=$extra_fields['name'].": ?".$extra_fields['value'];
? ?$this->Cell($data_array[0]+6,5,"",0,0);
? ? $this->MultiCell($this->text_fw,5,$line,PRODUCTS_BORDER,'L');
? }
?}
?}
Then In you pdf_config.php file add the following just before the ?>(this allows you to turn this on and off):
//Show the Product extra fields if you have this module installed (0 = no, 1 = yes)
//It can be downloaded from http://www.oscommerce.com/community/contributions,2202
define('SHOW_PRODUCTS_EXTRA_FIELDS',1);
If anyone has a better way or any suggestions please feel free to comment.
This is just my way of giving something back to the community.
PS: Should I add this as a contrib, and if so where??