nostradamus Posted March 30, 2012 Share Posted March 30, 2012 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 More sharing options...
nostradamus Posted March 30, 2012 Author Share Posted March 30, 2012 problem solved add $this->Image(_PS_IMG_DIR_.'tmp/product_mini_'.(int)($product['product_id']).'.jpg', 10 ); before line 897 $this->Ln(); the only problem left is how to add margin left to the description box. Link to comment Share on other sites More sharing options...
nilady Posted May 2, 2012 Share Posted May 2, 2012 nice script, but i have problem, when the end of page1, the next page, the picture will drop down weirdly Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now