Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Recommended Posts

Posted (edited)

I've installed PDF data_sheet maker 1.4 and everything works fine, however if my product description contains any quotes (single or double) the resulting PDF displays them as " (for ") and (for '). I also just noticed that it changes the degrees symbol (?) to %ordm; :(

 

Also, if the product description contains further images than the "default" image (i.e. added in the HTML of the product description) these are not displayed in the PDF.

 

Is there anyone that knows enough about this contrib to help out?

Edited by Marc_J
Posted

I sorted the quotes problem: -

 

In pdf/pdf_datasheet_functions.php

 

Find: -

	 if(SHOW_DESCRIPTION)
 {
	$this->SetFont('arial','',9);
 	$this->Cell($data_array[0]+3,5,"",0,0);
	$desc= array();
	$desc= explode("\n",$data_array[6]);
 	$x=$this->GetX();
			foreach ($desc as $desc_row){
				$desc_row= str_replace("\n",'',$desc_row);
				$desc_row= str_replace("<br>",'',$desc_row);
				$desc_row= str_replace("<li>",'? ',$desc_row);
				$desc_row= str_replace("<LI>",'? ',$desc_row);

 

Add after: -

					$desc_row= str_replace(""",'"',$desc_row);
				$desc_row= str_replace("“",'"',$desc_row);
				$desc_row= str_replace("”",'"',$desc_row);
				$desc_row= str_replace("’",'?',$desc_row);
				$desc_row= str_replace("º",'?',$desc_row);
				$desc_row= str_replace("°",'?',$desc_row);
				$desc_row= str_replace("&",'&',$desc_row);

 

This took care of variants of ("), (?) and (').

 

I still don't know about the additional images, though, and I'd also like it to include any product reviews now, too.....??

Posted

***UPDATE***

 

After some testing, it turns out that this contrib does show additional images (added using <img src="http://www.blahblah.com/catalog/images/myimage.jpg"> in the product description).

 

However, this only works when the additional images are in the default images folder (catalog/images). Images from anywhere else, even elsewehere on the same domain, don't show. If anyone knows a way around this.....?

 

Also, I have no idea where to even start adding reviews to the PDFs...still wanting to do this, though!

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

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