• My account
    • (X)Sign in

      I am a returning customer at TYPO3 Multishop

      Enter your username and password here in order to log in on the website:

      Forgot your password?

      Not yet customer of TYPO3 Multishop?

      • Order history
      • Automatic generated e-mail history
      • Track your Order
      New at TYPO3 Multishop
You are here:

Help by translating Multishop in your local language

On the following page you can help by translating Multishop in your local language:

https://translation.typo3.org/projects/TYPO3.ext.multishop/

Spanish:

https://translation.typo3.org/es/TYPO3.ext.multishop/pi1/locallang.xlf

The following language are already translated by our supporters:

  • Dutch
  • German
  • French

Adding Product Image to PDF invoice NOT succeed


Author Message
Ming
Peter Guan Ming
Multishop professional
Topic creator
registered since: 10.05.2012
Posts: 30
Hi, BAS and other friends

I thought I could modify the invoice template file (download_invoice.php) easily, since I saw the following code at line 67, which is not difficult for me to understand in order to modify it

PHP
$pdfdata['data'][]=array($prefix.number_format($product['qty']),$product['products_model'],
$product['products_name'].$sub_content,number_format($product['products_tax']).
"%",mslib_fe::Money2PDFDutchString($prefix.$final_price),mslib_fe::
Money2PDFDutchString($prefix.($product['qty']*$final_price)));


So, made following trials, none of them is successful to add image:

1. change $product['products_model'] to $products['products_image']
--> nothing is under column of product model tab in pdf

2. change $product['products_model'] to $image
--> nothing is under column of product model tab in pdf

3. change $product['products_model'] to mslib_befe::getImagePath($product['products_image']) (which I copy from product_list/grid.php)
--> only showed two forward slashes "//" under product model tab in pdf

Can someone help explain how to add product image (one image for each product) in the invoice pdf?

BTW, how to adjust image size for invoice header image? in setting-->invoice header image, I put a full url link to an image of size "282x86". However, the image is enlarged in pdf and occupied nearly 1/3 top page space.

Thanks for help...


[This article was edited 3 times, at last 15.05.2012 at 03:03.]
Written on: 15. 05. 2012 [02:59]
Ming
Peter Guan Ming
Multishop professional
Topic creator
registered since: 10.05.2012
Posts: 30

Where are you, BASE?

We need your help..... icon_cry.gificon_cry.gificon_cry.gif
Written on: 20. 05. 2012 [12:59]
bas
Bas van Beek
Multishop guru
registered since: 12.05.2010
Posts: 644
This is a very complex question and isn't easy to answer. You need to adjust the whole code to get the image inside, since the orders products entries are text.

If you truly need this kind of listing feel free to request a proposal (sales@bvbmedia.nl), so we can implement it for you.
Written on: 21. 05. 2012 [20:44]
Ming
Peter Guan Ming
Multishop professional
Topic creator
registered since: 10.05.2012
Posts: 30

Was spending some time reading FPDF manual (which is the plugin for Multishop invoice creation) for last few days.

Now, I am able to make image appear on the pdf invoice, however, still needs a lot of customization to meet what I need (e.g. position, sizing, color, alignment, etc).

But I ll take this as an opportunity to learn more about php customization. Since I am not php savvy, if I really can't make it at end, properly I will still come to you, BASE.

Thanks.. icon_wink.gif
Written on: 27. 05. 2012 [14:28]
bas
Bas van Beek
Multishop guru
registered since: 12.05.2010
Posts: 644
That is exactly what we tend to stimulate. But I remind you that FPDF can be tricky and very time consuming.

Another idea is that you provide the image onto the HTML invoice and that you convert it by using HTML2PDF. You can find more information about this on the following web site:

http://www.macronimous.com/resources/Converting_HTML2PDF_using_PHP.asp
Written on: 27. 05. 2012 [23:57]
Ming
Peter Guan Ming
Multishop professional
Topic creator
registered since: 10.05.2012
Posts: 30
Thanks so much, BASE

HTML2PDF looks more promising, and I will try it later on... icon_biggrin.gif


"base" wrote:

That is exactly what we tend to stimulate. But I remind you that FPDF can be tricky and very time consuming.

Another idea is that you provide the image onto the HTML invoice and that you convert it by using HTML2PDF. You can find more information about this on the following web site:

http://www.macronimous.com/resources/Converting_HTML2PDF_using_PHP.asp
Written on: 28. 05. 2012 [08:19]