Magento PDF invoice with product images extension

Featured Image

Hello everyone, short while after I wrote article Add custom attribute to Magento’s PDF invoice I received quite a number of requests for explanation on how to add products images to PDF invoice. As I had some time, I’ve created an extension that will do just that.

So, this extension is based on old one with custom attribute. It’s tested on Magento Professional 1.9, and will show thumbnails of product images (if those images exist, and Magento can read them) together with products on invoice.

Here’s a screenshot of one of my last tests:

After you’ve seen it and that’s what you require, you can download it here.

Installation process comes down to extraction of files / directories over your “app” directory.


Notes:
It won’t work with “custom attribute” extension I wrote earlier.
As always, please make backup before installation, as this is provided for usage at your own risk.

Cheers!

9
Top

Enjoyed this post?

Subscribe to our RSS Feed, Follow us on Twitter and spread it to your friends!

Author

Mladen Lotar

Ex. Inchooer

Mladen worked at Inchoo from 2010 to 2011 in the role of Magento/Zend developer

Other posts from this author

Discussion 9 Comments

Add Comment
  1. Meral

    Hi you code is not work for me. It creates a column of ‘Product Image’. But under that no images are showing. Right now i am working with my local machine.

    Thanks for further help.

  2. Dear Mladen, I have the same issue as Meral, I can see the new column with “Product Image” but I dont see the pictures.

    Thank you very much for your great job!!

    Best regards,

    Alejandro

  3. Windee

    Did anyone get this to work? It’s a handy ext!

  4. Max

    Try to replace
    $imageLocation = substr($imagePath,strlen(Mage::getBaseUrl()));

    $imageLocation = substr($imagePath,strlen(Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB)));

  5. Max

    P.S.
    sorry,
    here is the path:
    app/code/local/Inchoo/Invoice/Model/Order/Pdf/Invoice.php
    Line: 27

  6. anybug

    works like a charm, cheers guys

  7. Christopher

    For some reason, for products that have different attributes, the row height is messed up. Here is an example:http://i.imgur.com/ODWV0.jpg Any idea why this is?

  8. Thanks
    But where is the image of the invoice ?

  9. @tutela would you specify what do you mean?

    If I got your point, the image is the image associated for some of the ordered / invoiced products. You can control this from Magento admin panel -> edit product -> tab Images.

    Physically the images usually are placed in /media/catalog/* or /media/tmp/*

Add Your Comment

Please wrap all source codes with [code][/code] tags.
Top