rubygirl Posted March 20, 2006 Share Posted March 20, 2006 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! Quote Link to comment Share on other sites More sharing options...
demonangel Posted March 21, 2006 Share Posted March 21, 2006 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! Quote Link to comment Share on other sites More sharing options...
demonangel Posted March 21, 2006 Share Posted March 21, 2006 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 Quote Link to comment Share on other sites More sharing options...
demonangel Posted March 21, 2006 Share Posted March 21, 2006 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? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.