PDF invoice

  • Posts: 10
  • Thank you received: 0
9 years 9 months ago #190204

Bonjour,

Utilisateur de la version starter et avant d'acheter le plugin PDF invoice, je voudrais être sur qu'il joint bien la facture que l'on peut voir sur les commandes en back et non une simple copie du mail de confirmation.

Merci.

Please Log in or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
9 years 9 months ago #190208

Bonjour,

Ce plugin sert à attacher la facture en format pdf à l'email envoyé au client lorsque la commande est confirmée.
Le format de la facture est contenu dans le fichier "plugins/hikashop/attachinvoice/attachinvoice/invoice.php"

Please Log in or Create an account to join the conversation.

  • Posts: 10
  • Thank you received: 0
9 years 9 months ago #190263

Merci. Plugin acheté c'est parfait.

Please Log in or Create an account to join the conversation.

  • Posts: 191
  • Thank you received: 5
9 years 6 months ago #201597

Hello,

Is the pdf invoice also attached to the administrator email? I have the shop owner wanting the pdf invoice, does not like the html invoice, having problem printing them.

Also, does the pdf invoice now include product images?

Thank you
Kind regards
Lene

Please Log in or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
9 years 6 months ago #201611

Hi,

No the pdf invoice is not attached to the administrator email, but you can edit the plugin settings in order to populate the field "Send a copy to" with the admin email address. This way he will receive the pdf invoice at the same time than the user.

The plugin does not include product images, but that can potentially be done by editing the file "plugins/hikashop/attachinvoice/attachinvoice/invoice.php".

Please Log in or Create an account to join the conversation.

  • Posts: 191
  • Thank you received: 5
9 years 6 months ago #201714

Thank you, that is great :) .

Regards
Lene

Please Log in or Create an account to join the conversation.

  • Posts: 82
  • Thank you received: 8
  • Hikashop Business
9 years 4 months ago #209061

Hi can you give a code hint on how to show the product image in the pdf invoice

plugins/hikashop/attachinvoice/attachinvoice/invoice.php

Thanks

Please Log in or Create an account to join the conversation.

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
9 years 4 months ago #209064

Hi,

I'll recommend you that thread :
www.hikashop.com/forum/4-how-to/66908-ad...o-attachinvoice.html

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 82
  • Thank you received: 8
  • Hikashop Business
9 years 4 months ago #209490

Hi Jerome
Thanks the last post sorted my issue with the image file in the pdf.
I have a custom text area field that a customer fills out when buying a product - how can i display this in the pdf invoice?
I looked in Views order / invoice.php and saw some reference e.g line 135 <p class="hikashop_order_product_custom_item_fields"> but the following php didnt seem right so i think I'm barking up the wrong tree!
Thanks

Please Log in or Create an account to join the conversation.

  • Posts: 82868
  • Thank you received: 13378
  • MODERATOR
9 years 4 months ago #209494

Hi,

How did you configure your "custom text area field" ? Could you provide a screenshot of its settings so that we can understand exactly what you're trying to display ?

Please Log in or Create an account to join the conversation.

  • Posts: 82
  • Thank you received: 8
  • Hikashop Business
9 years 4 months ago #209518

Thanks Nicolas
See the screen shot

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 82868
  • Thank you received: 13378
  • MODERATOR
9 years 4 months ago #209585

Hi,

That's a screenshot of the product page, not of the settings of the custom field, which is what I asked.
But based on your screenshot, I can confirm that it is a custom item field, and they are automatically displayed on the invoice, as long as you have a recent enough version of the PDF invoice plugin (less than a year) and that you have the "backend listing" setting of your field turned on.
So please check on that.

The following user(s) said Thank You: huwhuw

Please Log in or Create an account to join the conversation.

  • Posts: 82
  • Thank you received: 8
  • Hikashop Business
9 years 4 months ago #209599

Thanks Nicolas - the issue was the "backend listing" setting of the field was turned off.
Great support

Please Log in or Create an account to join the conversation.

  • Posts: 9
  • Thank you received: 0
9 years 2 months ago #213782

Hi all,
I need to show a Custom Filed too in the PDF Invoice, but I can't get it.
I've tried all I saw in this post but it not works.

I need to show a Custom Field called for example "VAT id" in the Attached PDF Invoice.
This is a legal requirement on Italian Invoices.

I set a new Custom Field with HikaShop Admin (Display -> Custom Fields):

Label: Codice Fiscale
Table: address (i need it with address infos of the customer)
Column Name: cod_fiscale
Field type: Text
Display: everywhere (Front-End, Back-End Form, Back-end Listing) and it is all green.
(See attached jpg)

I get no Custom Field in the PDF attached Invoice...
(See attached jpg)

I tried to write some new class instances in plugins/hikashop/attachinvoice/attachinvoice/invoice.php like this:

echo "<br />Codice Fiscale" . $addressClass->displayAddress($order->fields->cod_fiscale,$order->$oneAddress->cod_fiscale,$view);
....
echo $class->displayAddress($this->element->fields,$this->element->billing_address,'order');
....
echo "<br />" . $addressClass->displayAddress($this->element->fields,$this->element->billing_address,'order');

without any success...
I see on PDF only the text parts of echo: "Codice fiscale: " and nothing more.

Why I have no custom field in the PDF Attached Invoice?
How can I write a correct class instance to get my custom field on PDF?
Did I forget something?

I read here that

...I can confirm that it is a custom item field, and they are automatically displayed on the invoice, as long as you have a recent enough version of the PDF invoice plugin (less than a year) and that you have the "backend listing" setting of your field turned on.

But it doesn't works.

Thank in advance for your help.
Best regards.
Fabrizio

Joomla 3.4.3
HikaShop Essential 2.5.0
PLG PDF Attached Invoice: No version showed in Joomla Plugin manager! (but I bought it three weeks ago)

Attachments:
Last edit: 9 years 2 months ago by fab966.

Please Log in or Create an account to join the conversation.

  • Posts: 82868
  • Thank you received: 13378
  • MODERATOR
9 years 2 months ago #213819

Hi,

You're looking at the wrong place.
What you need to do is to edit the file "address_template" for both your frontend and backend template via the menu Display>Views.
There, simply add the tag corresponding to your custom address field: {cod_fiscale}

That's it. No need to modify the PDF invoice plugin or add PHP code.

Please Log in or Create an account to join the conversation.

  • Posts: 9
  • Thank you received: 0
9 years 2 months ago #213887

Thank you for the answer,
I'll try it as soon as is possible and I'll give you a feedback.

Best regards.
Fabrizio

Please Log in or Create an account to join the conversation.

  • Posts: 251
  • Thank you received: 2
9 years 2 months ago #215417

Hi,
I edited the file "address_template" and I get my custom field, but I get it in both addresses: billing and shipping. Is there a possibility to get it only for the billing address?

Thank you

Please Log in or Create an account to join the conversation.

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
9 years 2 months ago #215419

Hi,

Not in the PDF invoice context.
The function "displayAddress" in the HikaShop address class does not have any parameter to indicate for the kind of address to display.
So the best will be to copy that function directly in your invoice override to not load the "address_template" but to specify an hard coded template.
Thanks to that, you can specify different template for the shipping and the billing.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 9
  • Thank you received: 0
9 years 1 month ago #216280

Hi all,
with your help I get now my custom field (Codice Fiscale) on the attached PDF invoice too.
Thanks a lot.
BUT...
I don't understand why I get it only by the FIRST print of the Invoice from Order List Page button.
If the Administrator need to print a second time the PDF from Order List Page the custom field and his value disappears !!!
Is there a difference between the first and the following PRINT actions?

Thanks in advance.
Best regards

Please Log in or Create an account to join the conversation.

  • Posts: 82868
  • Thank you received: 13378
  • MODERATOR
9 years 1 month ago #216287

Hi,

The PDF generating process is the same the first time and the second time and the times after.
So it probably means that the value of the custom field in the order has been changed. Either by the custom code you added, or a mass action (menu System>Mass actions) or some other kind of customization.
Hard to say exactly as we don't know what changes you made or if you're using mass actions at all, etc.

Please Log in or Create an account to join the conversation.

Time to create page: 0.133 seconds
Powered by Kunena Forum