Jump to content
kymation

[Addon] PDF Datasheet

Recommended Posts

Sorry, but that post is wrong. Those variables are not session variables. They are never added to the session in any part of stock osCommerce. They are calculated at the top of every page, in the code that I posted above.

 

The code in application_top.php is designed to set up the page to output HTML. Some of that code interferes with generating a PDF page instead, so we can't just use it. The simplest solution is to pass the variable as a GET in the link. Since the PDF generator doesn't use it in any other way, and it's not in the session, it should be safe to use.

 

In short, I still fail to see the problem, and I can't fix something that I can't see. Give me a test case that I can duplicate and I'll come up with a fix.

 

Regards

Jim


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

Share this post


Link to post
Share on other sites

I have the contribution installed and up and running, but have a few questions about the layout .

 

is there a way to center the image on the page, there are only options to place the image left or right ?

 

At the bottom of the screen my footer line does not go all the way across the page, it seems to be as long as the images size is.

 

See pdf attached.

 

thanks

 

Sandwick

post-213634-0-96028200-1361453341_thumb.png

Share this post


Link to post
Share on other sites

There is currently no way to center an image on a PDF. I don't understand the problem with the footer either. A URL to your store would help. You can PM that if you don't want it to be public.

 

Regards

Jim


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

Share this post


Link to post
Share on other sites

I see it but I don't understand it. The footer should not be able to do that. I've tried this on my test site, but I can't duplicate what you are seeing. Sorry, but I have no more ideas.

 

Regards

Jim


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

Share this post


Link to post
Share on other sites

Bummer, it has to be related with the image. if I change to image width to 300px wide, the footer line will be longer then what it is now.

 

Larry

Share this post


Link to post
Share on other sites

Hi Jim,

 

passing the variable as a GET in the link did the trick, it's working.

 

Thanks again for all your help.

 

Best regards,

 

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)

Share this post


Link to post
Share on other sites

Hi Jim,

 

I've got one more question.

I've installed the fonts for the Thai language and created an example file.

 

If I call the example file in my browser, it shows the Thai language perfectly but on the website it still doesn't

show the Thai language, it only shows square blocks.

 

I've been looking and searching around the internet but I haven't found the solution.

 

Do I need to change anything else or do I need more settings?

 

Kind regards,

 

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)

Share this post


Link to post
Share on other sites

I haven't tested the Thai language so I can't say from experience. You may need to change the font used based on the language. The existing font module doesn't do that.

 

Regards

Jim


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

Share this post


Link to post
Share on other sites

Hi Jim,

 

Using the "angsanaupc" font turned out to work for all languages, so that problem has been solved.

 

Thanks,

 

Best regards,

 

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)

Share this post


Link to post
Share on other sites

Thanks for that information. I should change the Fonts module to allow it to select different fonts on a language basis. i'll try to find the time to do that.

 

Regards

Jim


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

Share this post


Link to post
Share on other sites

I ask for a little help

 

If I only have one picture, everything works ok

 

Link : http://www.bej.si/trgovina/pdf_datasheet.php?products_id=3248&language=slovenian

 

 

If I have multiple images displayed error: TCPDF ERROR: [image] Unable to get image: images/

 

Link: http://www.bej.si/trgovina/product_info.php?cPath=1452_1456&products_id=3553

 

 

What is a possible reason for the error?

 

Joze

Share this post


Link to post
Share on other sites

The code looks for the first large image in the database. This error means that image name is blank or does not exist. Check the products_images table for all images with that products_id and delete any blanks. If there is no image #1, renumber the images so the first one is #1.

 

Regards

Jim


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

Share this post


Link to post
Share on other sites

Thanks for the quick reply.

 

Yes, the problem is the number of images in the database. I changed and it works.

 

Thank you again.

 

 

Regards

Joze

Share this post


Link to post
Share on other sites

@@kymation,

 

Hi Jim,

 

Your welcome.

If that's possible, it would be great.

 

Using one font is not perfect regarding font size and style.

 

regards,

 

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)

Share this post


Link to post
Share on other sites

Hello!

 

I'm one error away from having this work having already worked through a pageful using the forum etc. The only solution I've found to the error below:

 

Notice Trying to get property of non-object in /shop/includes/modules/boxes/bm_wishlist.php on line 37

 

Warning: Cannot modify header information - headers already sent by (output started at /shop/includes/modules/boxes/bm_wishlist.php:37) in /shop/ext/tcpdf/tcpdf.php on line 7599 TCPDF ERROR: Some data has already been output to browser, can't send PDF file

 

is to change

 

if (is_array($wishList->wishID) && !empty($wishList->wishID)) {
reset($wishList->wishID);
$counter = count($wishList->wishID);
$wishlist_box = '';
if ($counter <= MAX_DISPLAY_WISHLIST_BOX) {
$wishlist_box = '<ul style="list-style:inside disc; padding: 0px;">';

 

to

 

if (is_array($wishList['wishID']) && !empty($wishList['wishID'])) {
reset($wishList->wishID);
$counter = count($wishList->wishID);
$wishlist_box = '';
if ($counter <= MAX_DISPLAY_WISHLIST_BOX) {
$wishlist_box = '<ul style="list-style:inside disc; padding: 0px;">';

 

This allows PDF datasheet to work BUT stops main screen displaying saying it can't find the array.

 

Can anyone point me in the right direction?

 

Thanks,

 

Lorraine

Edited by herbsandhelpers

Share this post


Link to post
Share on other sites

This appears to be a bug in a Wish List addon. It has nothing to do with the PDF Datasheet. I suggest you ask in the support forum for the Wish List addon that you used.

 

Regards

Jim


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

Share this post


Link to post
Share on other sites

I have thank you.

 

There's also a problem with the images if I have Description module installed then for some products the image shows fine and PDF but for others get this error message:

 

Notice: getimagesize() url="function.getimagesize:"]http://s381732156.websitehome.co.uk/23435676shop/function.getimagesize"]function.getimagesize: Read error! in shop/includes/modules/pdf_datasheet/pd_description.php on line 54

 

TCPDF ERROR: Unable to get image: images/

 

Very strange! Looked in database and Product area in Admin can't see a difference in those that work and those that don't.

 

Lorraine

Edited by herbsandhelpers

Share this post


Link to post
Share on other sites

Do you have a large image uploaded for all of your products? Check the products_images table for the products that are getting the error message.

 

Regards

Jim


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

Share this post


Link to post
Share on other sites

This is what I can't understand. For the products I tested I made sure that all settings were the same in Products info in Admin and in products_images in database. They had large images each ... So weird!

 

This doesn't work:

 

row(s) starting from record #

in horizontal horizontal (rotated headers) vertical mode and repeat headers after cells s_fulltext.png id products_id image htmlcontent sort_order b_edit.png b_drop.png 1004 1057 TEAPIC.jpg NULL 0

arrow_ltr.pngCheck All / Uncheck All With selected: b_edit.pngb_drop.pngb_tblexport.png

 

 

 

Products Image:

Main Image (100 x 80px)

TEAPIC.jpg |

  • Large Image
     
    TEAPIC.jpg
     
    HTML Content (for popup)
     

 

This does:

 

row(s) starting from record #

in horizontal horizontal (rotated headers) vertical mode and repeat headers after cells s_fulltext.png id products_id image htmlcontent sort_order b_edit.png b_drop.png 21 601 BMLOGOWEB.jpg 1 arrow_ltr.pngCheck All / Uncheck All With selected: b_edit.pngb_drop.pngb_tblexport.png

 

Main Image (100 x 80px)

BMLOGOWEB.jpg |

 

 

Spot the difference!?!?!

Lorraine

Share this post


Link to post
Share on other sites

Your images are returning an authorization error so I can't check them directly. It appears that your small image and large image are the same, which is always a bad idea. However, that should not cause an error in the PDF Datasheet code. Did you check that the images actually exist on the server and can be retrieved by a web browser?

 

Edit: I just spotted it: The image that does not work has a sort_order of 0. The sort_order must be 1 for this image to work.

 

Regards

Jim

Edited by kymation

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

Share this post


Link to post
Share on other sites

Fixed! It worked! I just changed the sort order as you suggested and away it goes!

 

Just the wishlist array thing to go!

 

Where is the Product Specifications add on? If I install as a module still says it's not there ...

 

Thanks!

 

Lorraine

Share this post


Link to post
Share on other sites

Wish List Work Around:

 

Okay I've got this to work by un-installing the wishlist box and creating a new link to the Wish List in account.php

 

This allows PDF datasheet to work and maintains the Wish List function. The only drawback is no nice display as a box. Not a coder best I can do ....

 

Lorraine

Share this post


Link to post
Share on other sites

Formatting Description: in PDF data sheet all my product descriptions are rendering as one block of text all the <br> spacing and bold lost. I've got Echo Tabs installed. However is there a way to influence how the Description displays?

 

I've successfully altered the Product Link using inline CSS. However can't work out what to do on Description wouldn't mind just ul tags. Would rather not have to install Product Specifications as well is there another way?

 

Lorraine

Share this post


Link to post
Share on other sites

The Description module attempts to render HTML in the product description. The rendering engine is rather simple, so it will break if the HTML is too complex, invalid, or relies on external CSS. I suggest checking for valid HTML first.

 

Regards

Jim


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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×