Community Add-Ons
PDF data_sheet maker 1.1
for osCommerce Online Merchant v2.2
PDF data-sheet maker v.1.1
* Fixed some bugs of v1.0 and added some fatures.
* Images can have peculiar dimensions but proportions are maintained (settings in config file)
* Use of alternate image (es.: product_bimage) is now possible (set DB field name in config)
* Images other than .jpg .jpeg .png are replaced w/ "No Image" rectangle, but the rest of the document is rendered correctly.
Printed data will show:
* store name
* products category (path)
* products image (jpg or png shown only)
* description
* model
* manufacturer
* price (w/ - w/out tax)
* special price and expiry date
* options and options prices
* date of availability
* e-mail link
* watermark
Many thanks to David Rahrer for testing and corrections, and to Robert (Druide) for providing code improvement.
NOTES:
* tested on 2.2_MS1 Feb 21, 2003 , 2.2_CVS Jan 17, 2003.
* live example at http://www.chilipepper.it/catalog/
* feedback appreciated.
ivan
There is a bug on pdf_datasheet_functions.php.
Function ProductsDataSheet on line 452:
(int)$_GET['products_id'] is always taking 0 value, so no product data is shown on pdf file.
Changing that for $products_id pdf file is shoing correct product data.
FULL version attached.
FULL PACKAGE with UPDATE instructions
From 1.7.2 just upload and overwrite catalog/pdf/pdf_datasheet_functions.php as one database definition was missed...
Scott
Last product_info.php link was still missing a "/" in </td> causing it to format improperly. Added tips section...
Since v1.6.4
------------
* Added most available options to the admin
* Added a few options to the Admin that didn't exist
* Eliminated unnecessary options from config file
* Multi-lingual ready
* Patched the "Divide by Zero" error when no image exists and "Keep Image Proportions" is set to "Yes"
* Further streamlined product_info link
* Streamlined and updated the code
* Removed the previously integrated code for the "options as images" addon; placed it in a separate folder
* Cleaned up the installation doc
* Added update doc
* Added screenshots
* Added tips section
* Fixed product_info.php link issue
Scott
FULL PACKAGE with UPDATE instructions
The product_info.php link in the last installation was incorrect and rendered incorrectly in IE7 only. This package fixes that issue.
Since v1.6.4
------------
* Added most available options to the admin
* Added a few options to the Admin that didn't exist
* Eliminated unnecessary options from config file
* Multi-lingual ready
* Patched the "Divide by Zero" error when no image exists and "Keep Image Proportions" is set to "Yes"
* Further streamlined product_info link
* Streamlined and updated the code
* Removed the previously integrated code for the "options as images" addon; placed it in a separate folder
* Cleaned up the installation doc
* Added update doc
* Added screenshots
Scott
FULL PACKAGE with UPDATE instructions
Since v1.6.4
------------
* Added most available options to the admin
* Added a few options to the Admin that didn't exist
* Eliminated unnecessary options from config file
* Multi-lingual ready
* Patched the "Divide by Zero" error when no image exists and "Keep Image Proportions" is set to "Yes"
* Further streamlined product_info link
* Streamlined and updated the code
* Removed the previously integrated code for the "options as images" addon; placed it in a separate folder
* Cleaned up the installation doc
* Added update doc
* Added screenshots
Scott
guess there is a little bug in thsi contrib, bg-color doesnt work because of a mismatch between config and functions:
changed "PAGE_BG-COLOR" to "PDF_PAGE_BG_COLOR" in file pdf_datasheet_config.php to eleminate this mismatch, for example:
define('PDF_PAGE_BG_COLOR','230,230,230');
thats all to make it work ;-) ... looks that simple but made me spending hours and hours trying and testing ^^
Full package for Russian Translation, include russian fonts and russian readme file.
If you wonder why you get an "FPDF error: GIF parser: unable to open file" when calling the pdf_datasheet.php script this might be because your provider upgraded to PHP5 and the loadFile method in the CGIF class is not compatible with PHP5.
I've attached an updated CGIF class which is available from http://sourceforge.net/tracker/index.php?func=detail&aid=1537502&group_id=114602&atid=668888
If you're using MySQL5 you need to slightly change the $print_catalog_query in line 503 of pdf_datasheet_functions.php as follows:
$print_catalog_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, p.". PDF_ALT_IMAGE .", p.products_model, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.products_status, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, s.expires_date, m.manufacturers_name from " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . $products_id . "' and p.products_id = pd.products_id and pd.language_id = '" . $languages_id . "'");
PDF datasheet v 1.6.4 adapted for SPPC
I took the contribution "PDF datasheet v 1.6.4" by "aldeko" the 17 Mar 2007 and made it compatible with Seperate Price per Customer (SPPC).
i also opened a seperate Contri for not mixing up these two contris. so things should be clear for everybody i hope. you can find it here:
http://www.oscommerce.com/community/contributions,5085
have phun
Full package Inc. Dutch Translation
Complete package for osCommerce 2.2 Milestone 2 Update 060817
Add instruction in the file readme.txt
Regards
Roberto
Complete package for osCommerce 2.2 Milestone 2 Update 060817
A small correction Link Logo Data sheet
In file pdf_datasheet_functions.php on line 68
Del:
$this->Image(PDF_STORE_LOGO,'10','5',($size[0]*PDF_TO_MM_FACTOR),($size[1]*PDF_TO_MM_FACTOR), $imagetype, FILENAME_DEFAULT);
and insert:
$this->Image(PDF_STORE_LOGO,'10','5',($size[0]*PDF_TO_MM_FACTOR),($size[1]*PDF_TO_MM_FACTOR), $imagetype, HTTP_SERVER . DIR_WS_HTTP_CATALOG . FILENAME_DEFAULT);
Good work
partial update code for php5 in gif.php (uppercase)
update code for fpdf.php update to ver 1.5.3
update code for mysql 5
not fixed:
create pdf to image GIF in php5 (use images PNG o JPG)
full version
(sorry bad title)
partial update code for php5 in gif.php (uppercase)
update code for fpdf.php update to ver 1.5.3
update code for mysql 5
not fixed:
create pdf to image GIF in php5 (use images PNG o JPG)
full version
I see that they have some security in play here that removed an important back slash from the code I just posted below. Just down load the zip file to get the correct lines of code otherwise you will get an error if you use the lines you see below.
I had some items that contained a forward slash in the product name. This caused errors when I clicked on the pdf printer link because it was looking for a file in a directory that doesn't exist. I corrected this issue by adding the the necessary data into the preg_replace argument.
The two lines that need to be updatedare found in catalog/pdf/pdf_datasheetfunctions.php around lines 768 and 769:
$find = array('/ä/','/ö/','/ü/','/ß/','/Ä/','/Ö/','/Ü/','/ /','/[:;]/');
$replace = array('ae','oe','ue','ss','Ae','Oe','Ue','_','');
change to:
$find = array('/ä/','/ö/','/ü/','/ß/','/Ä/','/Ö/','/Ü/','/ /','/[:;]/','///');
$replace = array('ae','oe','ue','ss','Ae','Oe','Ue','_','','-');
and that's it. thanks for a great contribution.
This is my first contribution, i fixed the problem with the language dir stated below and i added 2 new translations for spanish and french.
Enjoy :)
Do not down load this file it is a dummy file.
The directory /languages/ is mispelled in the last package below as /laguages/.
Just figured noting it here will save someone the headache that i had to deal with.
Great contrib though, once implemented correctly.
Hi Markus,
you could have used the file of the 1.3 version, it is still unchanged. But nevertheless here`s the complete package with the updated configuration.sql and the missing pdf_datasheet.php.
So everybody, please download this package for the 1.4-Version.
Greetings, Jochen
Hi,
notice to Jochen Kirchhoff!
The file "/catalog/pdf_datasheet.php" is missing in the archive. Please add the missing file to the contrib archive.
Thanks a lot!
Greetings
Markus
Sorry, there was a missing statement in the sql-file (the statement for table 'configuration_groups' was missing) & errors that could lead to error-messages.
Heres the statement for those who have installed without errormessages:
INSERT INTO `configuration_group` (`configuration_group_id`, `configuration_group_title`, `configuration_group_description`, `sort_order`, `visible`) VALUES (200, 'PDF-Datasheet-Maker', 'Configures the Datasheet-Maker', 200, 1);
all others: please use the attached updated configuration.sql.
Cheers, Jochen
After i install the sql dump, i dont find
any entry in the admin section, under
configuration...
Cheers
Hobbes
P.S. No file to download attached
Changelog:
-New Feature: Configuration via Admin
-Introduced the Configuration via Admin->Configuration->pdf-datasheetmaker. Still not complete, but a lot more
convenience
-New Feature: "Download or Redirect"-Selection
-The redirect is now made by native PHP and not longer via Java Script
-Introduced a new download feature, the document can now be downloaded optionally.
-New Feature: Save Datasheet
-The generated files are optionally stored in a subdirectory of your catalog-directory
If a file already has been generated, it is saved and next time only the redirect to or the download of the
file is executed. This speeds up the downloads or redirects by far.
ATTENTION: Be sure to chmod the directory, where your documents shall be saved, to appropriate rights!
-New Feature: pdf-datasheet is now prepared for the 3-Images-Contrib. Configurable still in
pdf_datasheet_config.php, you have to decide, which image you want to have on the datasheet.
-New: Introduced an alt-Tag for the Acrobat-Symbol
New Functions:
-download(), generally suitable for various sorts of files
-generatefilename(), generates a filename out of the productsname. The languages_id is stored within
to ensure the multilanguage compatibility if some productsnames are the same in different languages
-writefilename(), simply a wrapper for the 'Output' command
Bugfixes:
-fixed a bug, where the first page was empty, if the productsdescription was to long for one page
A german pdf_datasheet.php has been added
To do:
-There are still some configuration-values in the pdf_datasheet_config.php. Put them in the Admin, so the
pdf_datasheet_config.php will not longer be needed.
enjoy!!
Greetings, Jochen
This is just a little update for the Pdf Data Sheet maker v1.3
I got an error when a product din't have a picture
This corrects the problem
Change line 240 in pdf_datasheet_functions.php into
if(SHOW_IMAGES && strlen($data_array[10])<=1)
dutch language pack for :PDF data_sheet maker 1.1
In fact, there're 2 missing sql queries to slove #1054 errors....
Run the following SQL queries in your SQL database
ALTER TABLE `products_options_values` ADD `products_options_values_thumbnail` VARCHAR(60) NOT NULL;
ALTER TABLE products_options ADD products_options_images_enabled TINYINT(1) UNSIGNED DEFAULT "1" NOT NULL;
Thanks and credits to Oneill... ;o)
Das ist die deutsche Ergänzung für den PDF-Maker. Die Installation der englisch/französischen Version ist allerdings Voraussetzung.
Die anhängende pdf_datasheet.php einfach in den richtigen Ordner kopieren - fertig.
Optional liefere ich noch eine Empfehlung für die Platzierung des pdf-pic mit.
PROBLEM:
-------
Some people are getting error 1054 after installing PDF Data-Sheet Maker v1.3
installed on MS2
ERROR:
-----
1054 - Unknown column 'popt.products_options_images_enabled' in 'field list'
CAUSE:
-----
This error is related to a missing COLUMN 'products_options_images_enabled' in the TABLE 'products_options' of the SQL database.
SOLUTION:
--------
Run the following SQL query in your SQL database (with for example phpadmin).
It adds the missing products_options_images_enabled COLUMN tot your TABLE and the problem must be solved.
SQL query:
---------
ALTER TABLE products_options ADD products_options_images_enabled TINYINT(1) UNSIGNED DEFAULT "1" NOT NULL;
The above solution is tested with MS2
John Andriessen
Due to size limit for upload of contributions (300K), this is a package with various fonts that can be used by PDF Datasheet.
A big update with all the latest features. Here is the changelog :
v1.30 by Didier Debbaut
Changelog :
- image pdf.gif has been moved to /catalog/images folder
- compatible with latest class FPDF v1.52
- compatible with contribution "Options as Images for MS2"
- includes GIF support
- includes multi-language support for product name, description, etc.
- display of company logo instead of company name (configure in pdf_datasheet_config.php)
- added french language file
- added PDF properties : author, title, subject
- added Verdana font (to activate : see end of pdf_datasheet_functions.php)
- added color for body text
- added color for product name
- added color for special price
- added color for footer text
- model and manufacturer are initialised with "-" if they are emtpy
- fixed problem of line after product description that sometimes is displayed in the image and not underneath
- possibility to align all option values horizontal or vertical (default : horizontal)
- correction for SEARCH_ENGINE_FRIENDLY_URLS
The "Options as Images for MS2" feature allows product options to be displayed as images,
and the user selects an option by clicking a radio button below the image.
This patch to the PDF data_sheet maker will show the images for the options in the generated pdf.
See <a href="http://www.sologvann.no/documents/pdf_datasheet_options_sample.pdf">http://www.sologvann.no/documents/pdf_datasheet_options_sample.pdf</a> for an example generated file.
I include in the download a file and instructions to get gif files support. Only 4 easy steps.
I only copy and paste some code from "Catalog products PDF reports", ¡¡¡mil gracias para ellos!!!
german translation for PDF data_sheet. (simply) upload file to "catalog/includes/languages/german/"
cheers,
codeonline
This file adds display of additional images which are stored as links in the
table product_descriptions products_description field.
An image must be stored as standard html tag, i.e.
<img src="sample.jpg">
Additional information like height and width in the tag is ignored, the script
get this information from the image itself. If the size exceeds the predefined
maximum in admin, it is re-scaled.
Use at your own risk.
The script is based on VERSION 1.2.1 rev of PDF data-sheet maker.
Enjoy!
Werner Bleckwendt
Just a complete package including all the previous patches.
PDF data-sheet v1.2 (all_pags_header) including option prices bug fix
and date expected bug fix reported by Dave (daithi).
- osCommerce 2.2-MS1
Replace pdf_datasheet_functions.php only.
Please report bugs, thank you.
ivan
I add an spanish translation for PDF data_sheet from Ivan Pascutti
Regards,
FM
Re-upload
This is will add path and Products name to page header.
Replacing the attached file should do it.
I might have done some other minor changes, so backup first.
I made this small change after Geoser kind request, maybe someone else might be interested in it.
enjoy
ivan
/*
$Id: pdf_datasheet_creator BUG FIX - 2003/04/20 21:39:20 ip chilipepper.it Exp $
osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com
Copyright (c) 2003 osCommerce
Released under the GNU General Public License
*/
Bug fix: option prices do not display tax.
find
- in pdf_datasheet_functions.php v.1.1 (MS1) line 482
- in pdf_datasheet_functions.php v.1.2 (all_pages_header) line 516
$this->Write(5,$products_options_values['products_options_values_name']. ' (' . $products_options_values['price_prefix'] . $currencies->display_price($products_options_values['options_values_price'], tep_get_tax_rate($product_info_values['products_tax_class_id'])) . ')' . $add_to);
and replace w/:
$this->Write(5,$products_options_values['products_options_values_name']. ' (' . $products_options_values['price_prefix'] . $currencies->display_price($products_options_values['options_values_price'], tep_get_tax_rate($print_catalog['products_tax_class_id'])) . ')' . $add_to);
Reported by Tony Hodges.
ivan
This is will add path and Products name to page header.
Replacing the attached file should do it.
I might have done some other minor changes, so backup first.
I made this small change after Geoser kind request, maybe someone else might be interested in it.
enjoy
ivan
PDF data-sheet maker v.1.1
* Fixed some bugs of v1.0 and added some fatures.
* Images can have peculiar dimensions but proportions are maintained (settings in config file)
* Use of alternate image (es.: product_bimage) is now possible (set DB field name in config)
* Images other than .jpg .jpeg .png are replaced w/ "No Image" rectangle, but the rest of the document is rendered correctly.
Printed data will show:
* store name
* products category (path)
* products image (jpg or png shown only)
* description
* model
* manufacturer
* price (w/ - w/out tax)
* special price and expiry date
* options and options prices
* date of availability
* e-mail link
* watermark
Many thanks to David Rahrer for testing and corrections, and to Robert (Druide) for providing code improvement.
NOTES:
* tested on 2.2_MS1 Feb 21, 2003 , 2.2_CVS Jan 17, 2003.
* live example at http://www.chilipepper.it/catalog/
* feedback appreciated.
ivan
