Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Addon] PDF Datasheet


kymation

Recommended Posts

Okay the HTML within the div is rather simple mainly <br>, <b>, <i> etc. with closing tags. However the div is calling the button CSS so maybe that's why it fails ...

 

Where is the page text rendered in the footer please. I'd like to alter it. Also I'm getting half a line on last page.

 

Thanks for your quick responses.

 

Lorraine

Link to comment
Share on other sites

The buttons should be outside the description so they wouldn't make a difference. Do you have a link so I could look at the page?

 

The footer is automatically generated by the TCPDF library. It's possible to override the header and footer, but I didn't write a module to do that since it's really complex and most people wouldn't use it.

 

There is no orphan/widow control, so a single line on the second page is quite possible. There's no fix for that.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

Sorry for development my test site is locked off however here is the description:

 

<div id="tabs">
		<ul>
		<li><a href="#tabs-0">Description</a></li>
		</ul>
		<div id="tabs-0">
		<b>TOTAL TRACEABILITY AND STOCK MANAGEMENT AUTOMATICALLY AS YOU WORK!<br />
		<br />
		PRACTICE MANAGEMENT TOOL FOR HERBALISTS, NATUROPATHS, ETC.</b><br />
		<br />
		<i>'Everything you need to do as a herbalist should be covered'</i><br />
		<br />
		<b>NEW RELEASE! - New features:</b><br />
		<br />
		There are sooooooooo many new features that have been added the best thing is to just try it! You can read about it here:<br />
		<br />
		Goes to Batch Master Support Centre click 'Batch Master Support Forum'. <a href="/batchmaster/" target="_blank"><u>Click here to go to the Batch Master Support Forum and read about latest release</u>.</a><br />
		<br />
		<b>Installation:</b><br />
		<br />
		On Windows Vista, Windows 7 and Windows 8 opens/runs from the desktop shortcut once you have set this to 'Run as Administrator' <br />
		<br />
		On Windows XP use the shortcut on the Batch Master PRO program menu to open. You can right click, copy and paste this onto your desktop if you prefer.<br />
		<br />
		● New Update released Batch Master PRO Heaven:<br />
		<br />
		● A new installer means one click starts the installation and cleans up after, leaving Batch Master PRO ready to use after RESTART. Installation can take 10-15 minutes in total to complete.<br />
		<br />
		● Batch Master PRO works fully on Windows XP, Windows Vista, Windows 7 and Windows 8 from standard user accounts. On first time use right click Batch Master PRO desktop shortcut and set to 'Run as Administrator' for Windows Vista, Windows 7 and Windows 8, this stops 'Cannot create a file when that file already exists error' and ensures Batch Master PRO always opens from desktop shortcut from now on. On Windows XP use the shortcut on the Batch Master PRO program menu to open. You can right click, copy and paste this onto your desktop if you prefer.<br />
		<br />
		● On Windows Vista, Windows 7 and Windows 8 you may need to allow Batch Master PRO permission using your anti virus and firewall programs, but not always.<br />
		<br />
		● No Microsoft Office or Access needed unless you want to export contact data to Microsoft Outlook. Batch Master PRO is compatible with all Office and Access applications that you may have installed.<br />
		<br />
		● Context sensitive, screenshot rich Help File (Press F1 anytime in Batch Master PRO) or use the Online Batch Master support centre 24/7.<br />
		<br />
		<b>INSTRUCTIONS:</b>(Follow this procedure carefully!)<br />
		<br />
		<b>1)</b> At the end of the order process, scroll down and press the blue DOWNLOAD button. When the dialog box appears choose Save. Save to a location on your computer e.g. Desktop, My Documents etc.<br />
		<br />
		<b>2)</b> Please TURN YOUR FIREWALL OFF for installation ONLY, reactivate on reboot! Please note some firewalls may stop installation giving a Code 5, Access is denied, Windows error, permissions error. Batch Master installation files have been scanned using Kaspersky 2012 Internet Security, please scan again using your own anti-virus if you prefer. After restart/reboot Batch Master PRO should run okay with firewall activated, give it permission if needed.<br />
		<br />
		<b>3)</b> Locate and double click the BatchMaster.exe installation file (can take a couple of minutes to start running) and follow on screen prompts, installation takes about 10-15 minutes to complete. Wait for the Updates to install at the end of installation before REBOOTING/RESTARTING your computer, it can take 5-10 minutes after main install finished before updates finish installing and you see updates complete notice.<br />
		<br />
		<b>4)</b> Once your computer has restarted. Batch Master PRO should now be ready to use. Windows Vista, Windows 7 and Windows 8 users right click desktop shortcut and set to 'Run as Administrator' (In Vista click Properties then Advanced, check/tick Run as Administrator box, click OK and Apply). On Windows XP use the shortcut on the Batch Master PRO program menu to open. You can right click, copy and paste this onto your desktop if you prefer. The best way to set up is follow the Ten Simple Setup Steps, once complete you're ready to go. Press F1 for help at anytime. (If you prefer you can use Herbs and Helpers set up service listed in shop.) <br />
		<br />
		<b>5)</b> If you get any problems then go into the Batch Master PRO programs menu (Click Start then All programs) and press Verify Runtime Installation, allow it to finish. Then press Verify Updates Installation and let it finish. No need to restart after. Help on all the above in README and INSTALL notices during installation. <br />
		<br />
		PLEASE NOTE: You should also REGISTER in the Batch Master Support Centre on this site for further free updates, installation support etc. This is the latest version of Batch Master PRO. <br />
		<br />
		If you are a previous Batch Master customer then you will need to do a complete uninstall and reinstall first. DON'T FORGET TO MAKE A FEW SAFE COPIES OF YOUR DATA FILE FIRST! Before you uninstall your current version get a <b>Removal Code</b> so you can re-license for free.<br />
		<br />
		<b>FEATURE LIST</b><br />
		<br />
		You can read about Batch Master PRO here: <a href="/Pages/batchmaster.htm" target="_blank"><u>Click here to go to the Batch Master features pages and read ALL about it</u>.</a> </div>
		</div>

Link to comment
Share on other sites

I tried that on my test site, and I'm getting encoding errors on the spaces at the beginning of most of the lines. Check that your editor is set up to use UTF8, or just delete the indents.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

Sounds like encoding errors. That can mess up more than just the PDF, although the PDF library is particularly sensitive to anything that is not UTF-8. Glad to hear that you got it figured out.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

  • 3 weeks later...

Hi Jim,

 

I've installed the following addon:

 

http://addons.oscommerce.com/info/8560/v,23 (Protected images for osc2.3.3

 

Now I'm trying to get the pdf-datasheet to be compatible with this addon.

I think, I'm quite far in the right direction but as I'm not a coder, I'm not sure wether this is correct,

I checked the new image route, this is correct, but I still get the following error message:

 

TCPDF ERROR: [image] Unable to get image: images/1

 

The changed code is as follows:

 

function execute() {
global $PHP_SELF, $pdf, $products_id, $languages_id, $currencies, $current_y, $image_folder;

if( basename( $PHP_SELF ) == 'pdf_datasheet.php' && isset( $products_id ) && $products_id > 0 ) {
// Get the product name
$product_info_query_raw = "
select
pd.products_description,
pi.image,
p.image_folder,
p.image_display
from
" . TABLE_PRODUCTS . " p ,
" . TABLE_PRODUCTS_DESCRIPTION . " pd left join
" . TABLE_PRODUCTS_IMAGES . " pi
on (pi.products_id = pd.products_id
and pi.sort_order = '1')
where
pd.products_id = '" . $products_id . "'
and pd.language_id = '" . ( int )$languages_id . "'
";
$product_info_query = tep_db_query( $product_info_query_raw );
$product_info = tep_db_fetch_array( $product_info_query );

// BOF Protected Images for osCommerce 2.3.3
$image_size = '';
if ($product_info['image_display'] == 1) { // use "No Picture Available" image
$image_size = tep_image(DIR_WS_LANGUAGES . $language . '/images/' . 'no_picture.gif', TEXT_NO_PICTURE, SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5" style="float: right;"');
} elseif (($product_info['image_display'] != 2) && (tep_not_null($product_info['image']))) { // show product images
// EOF Protected Images for osCommerce 2.3.3

// Get the image information
$image_size = getimagesize(DIR_WS_IMAGES_PROD . $product_info['image_folder'] . $product_info['image']);

 

I probably need to change more files, but I tried this one as a start.

 

I hope you've got some time to help me out,

Thanks,

 

Gerhard

Addons installed on my website:

 

- Addons Installed

- Advanced Special Offer Discounts

- AJAX-Attribute Manager for osc 2.3.1

- Banner box v1.1.1

- Dutch Language Pack

- Extra Pages-info box with admin for OSC2.3

- German Language Pack

- Login Box

- Multi-language Support for Configuration

- Multiple products manager

- Order Editor

- OSC PDF Catalogue 2.1

- PDF-Datasheet

- product Field Groups

- Quickly Update Product Stock

- Unit of weight

- YAG (Yet another Guestbook)

Link to comment
Share on other sites

I have no idea. PDF is a difficult format at best. Some readers will display a file just fine, while others mess up the display in various ways. You could try a PDF Validator on a file that's giving you trouble and see what it says.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

Well here's the output and this is from a PDF file that (apart from spacing) works !?!?!

 

Validating file "30_day_FREE_Download_Offer_Windows_32_bit_computer..." for conformance level pdfa-1b The required XMP property 'pdfaid:part' is missing. The required XMP property 'pdfaid:conformance' is missing. The key CIDSet is required but missing. A device-specific color space (DeviceRGB) without an appropriate output intent is used. A device-specific color space (DeviceGray) without an appropriate output intent is used. The key S has a value Transparency which is prohibited. (2) The font Helvetica must be embedded. The document does not conform to the requested standard. The document contains device-specific color spaces. The document contains fonts without embedded font programs or encoding information (CMAPs). The document contains transparency. The document's meta data is either missing or inconsistent or corrupt.

Done.

 

Phew!

Link to comment
Share on other sites

Like most validators, this one is overly picky. None of those errors are fatal. That document should display correctly in any reader.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

I don't have an IPhone so I can't test this. The stock library doesn't seem to have anything that mentions these errors, so it's probably missing. I don't have the time to fix the library anyway.

 

One experiment you can try: Find a PDF that the IPhone does display correctly and run it through the validator. That will at least determine if one or more of those errors is causing the problem.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

  • 2 months later...

Hello,

 

I get this error,

 

 

Notice: Constant MODULE_ORDER_TOTAL_COD_FEE_SERVICEPAKKE already defined in /home/content/17/8283017/html/shop/catalog/pdf_datasheet.php on line 66

 

Notice: Constant NEW_SIGNUP_GIFT_VOUCHER_AMOUNT already defined in /home/content/17/8283017/html/shop/catalog/pdf_datasheet.php on line 66

 

Notice: Constant NEW_SIGNUP_DISCOUNT_COUPON already defined in /home/content/17/8283017/html/shop/catalog/pdf_datasheet.php on line 66

 

Notice: Constant MODULE_ORDER_TOTAL_COD_FEE_FEDEX already defined in /home/content/17/8283017/html/shop/catalog/pdf_datasheet.php on line 66

 

Warning: require_once(ext/tcpdf/config/lang/eng.php) [function.require-once]: failed to open stream: No such file or directory in /home/content/17/8283017/html/shop/catalog/pdf_datasheet.php on line 212

 

Fatal error: require_once() [function.require]: Failed opening required 'ext/tcpdf/config/lang/eng.php' (include_path='.:/usr/local/php5/lib/php') in /home/content/17/8283017/html/shop/catalog/pdf_datasheet.php on line 212

 

 

Any idea how to solve it? Would appreciate if you can guide me step by step especially if it involves SQL, not good at all doing data base.

 

Thanks !!

Link to comment
Share on other sites

You have four errors that have nothing to do with this addon. See the appropriate addon package or ask in the support thread for that addon.

 

The last two errors are apparently caused by a missing TCPDF package. Read the installation instructions for the install steps for TCPDF.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

@@kymation

 

2.2.4 The FPDF Library Files

The TCPDG Library is not included in this distribution because it makes the package too large

for the osCommerce Addons server to accept. Before installing any of the files, go to

http://sourceforge.net/projects/tcpdf/files/ and download the latest version of the library. Note:

This Addon has been tested with the TCPDF library version designed for PHP 5 only. The PHP

4 version will not work with osCommerce 2.3.x.

When you have downloaded the library, unpack the archive. This will give you a directory

named tcpdf containing the library files. Upload this directory and all the files it contains to the

ext/ directory of your osCommerce store. If you want to save some room, you can omit the

following directories and files:

tcpdf/doc/<all files>

tcpdf/examples/<all files>

tcpdf/images/<all files>

tcpdf/CHANGELOG.TXT

tcpdf/LICENSE.TXT

tcpdf/README.TXT

2.2.5 Add New Files

Upload the files in the New Files directory in this package (listed under New Files below) to

your store, keeping the directory structure the same as the installed copy of your store. Note

that some of these files may be in directories that do not exist in a stock copy of osCommerce.

Your FTP client will create those for you if you upload the entire contents of the New

Files/catalog folder. You will need to create these directories manually if you upload the files

one at a time.

The following file in the New Files list will overwrite a file from the TCPDF library. This is

intentional.

catalog/ext/tcpdf/config/tcpdf_config.php

 

Hi,

 

I downloaded TCPDF from sourceforge and copy it inside the /ext but it doesnt have

 

ext/tcpdf/config/lang/eng.php

 

This file is still missing, hence i still have the last 2 errors.

 

Regards,

Link to comment
Share on other sites

It appears that the TCPDF distribution has changed. Copy the lang directory and its contents from the examples directory to the conf directory. Please post here if this works.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

Hi,

 

This is what i get now, can help me explain what i have to do next to get rid of the other errors? Need some guidance and direction.

 

Notice: Constant MODULE_ORDER_TOTAL_COD_FEE_SERVICEPAKKE already defined in /home/content/17/8283017/html/shop/catalog/pdf_datasheet.php on line 66

 

Notice: Constant NEW_SIGNUP_GIFT_VOUCHER_AMOUNT already defined in /home/content/17/8283017/html/shop/catalog/pdf_datasheet.php on line 66

 

Notice: Constant NEW_SIGNUP_DISCOUNT_COUPON already defined in /home/content/17/8283017/html/shop/catalog/pdf_datasheet.php on line 66

 

Notice: Constant MODULE_ORDER_TOTAL_COD_FEE_FEDEX already defined in /home/content/17/8283017/html/shop/catalog/pdf_datasheet.php on line 66

 

Notice: Constant MODULE_BOXES_LOGINRADIUS_TITLE already defined in /home/content/17/8283017/html/shop/catalog/includes/languages/english/modules/boxes/bm_loginradius.php on line 12

 

Notice: Constant MODULE_BOXES_LOGINRADIUS_TITLE already defined in /home/content/17/8283017/html/shop/catalog/includes/languages/english/modules/boxes/bm_loginradius.php on line 16

 

Fatal error: require() [<a href='function.require'>function.require</a>]: Cannot redeclare class shoppingcart in /home/content/17/8283017/html/shop/catalog/includes/application_top.php on line 124

Link to comment
Share on other sites

Each one of those is due to something that you've added or changed. I hop you've kept track of your edits. Here's a quick summary (from the bottom up):

  • The last one is the worst. That fatal error has completely broken your shopping cart. The error message says it's a bad edit to catalog/includes/ application_top.php at line 124, however the actual error could be higher on that page or on an included file. There may be more errors, but this one stops them from being reported.
  • Two errors from something to do with Loginradius. Looks like a duplicate define in catalog/includes/languages/english/modules/boxes/bm_loginradius.php.
  • Something to do with Fedex.
  • Something to do with a Discount Coupon addon.
  • Something to do with a Gift Voucher addon.
  • Something to do with something called "servicepakke".

In the ones where the error message doesn't tell you anything other than catalog/pdf_datasheet.php, you'll just have to find that text in the code. Use the search program in your OS or in your editor, or download a copy of GREP for your computer and learn to use it. Ask for help in the support thread for the addon that you installed or in the general forum.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

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