Jump to content

product image in pdf


nostradamus

Recommended Posts

I want to add product image to the pdf invoice from ps 1.4.6.2

 

 

I have added this to my pdf.php in classes

 

			 $cover = Product::getCover((int)($product['product_id']));
			    if(is_array($cover)) $product = array_merge($cover, $product);
			    $limage = _PS_IMG_DIR_.'p/'.(int)($product['product_id']).'-'.(int)($product['id_image']).'-medium.jpg';
			    if (file_exists($limage)){
				    $this->Image($limage,110,null,13);
			    } else{
				    $this->Image(_PS_IMG_DIR_.'/p/noimage.jpg',110,null,13);
			    }

			    $this->Ln();

 

But all i get is the no image. It wont show the product image at all.

 

what did i do wrong can someone give me a clue?

Link to comment
Share on other sites

  • 1 month later...

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
×
×
  • Create New...