Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PDF invoice #49

Open
aalexia opened this issue Sep 20, 2017 · 7 comments
Open

PDF invoice #49

aalexia opened this issue Sep 20, 2017 · 7 comments

Comments

@aalexia
Copy link

aalexia commented Sep 20, 2017

Hi everyone,

When i generate an invoice pdf to print, all different language lines are shown for each product name like [:fr]...[:en]...[:]. This is not the same issue for the mail, but just the pdf.
Do you have any solution ? I tried to modify options but it doesn't fix it.
Thanks,
Alexia

@valerensi
Copy link

Hello @aalexia
I have tried many plugin for invoice generation, but all have the same problem.

I've directly contact the creator of "WooCommerce PDF Invoices and Packing Slips Bundle" plugin.
They simply answered me that they no longer support qtranslate-x (only WPML and Polylang).

My last chance is now Yithemes. I've written to them and they are testing the premium version of this plugin (https://yithemes.com/themes/plugins/yith-woocommerce-pdf-invoice/) to find out if it's compatible with qtranslate-x because the free one of course isn't.

If you want, when I will receive their feedback I should write you back!

@aalexia
Copy link
Author

aalexia commented Oct 2, 2017

Hello @valerensi
Thanks for your answer ! It's a pity for the plugin.
Indeed, i'm interested by your feedback :)

Have a good day !

Alexia

@valerensi
Copy link

Hello @aalexia,
we have modified the plugin adding a php tag qtranxf_gettext in the product name:

<span class="item-name"><?php echo qtranxf_gettext($item['name']); ?></span>

This solve the issue for us.

@aalexia
Copy link
Author

aalexia commented Oct 17, 2017

Hi @valerensi thanks for your answer ! I'll try your solution :)

Have a good day,

Alexia

@imreba
Copy link

imreba commented Jan 6, 2018

Hi @aalexia I am having the same problem as you. Did you try the solution offered by @valerensi ?

Thanks in advance
Imre

@aalexia
Copy link
Author

aalexia commented Jan 8, 2018

Hi @imreba we have found an other solution by adding a custom field in each product with a custom name (for exemple "designation_fr"), then you just have to add custom file (Product) in the plugin PDF (tab Customizer), and put in the Field name box your custom name "designation_fr".
Hope it will work for you !

Alexia

@Elusive2K
Copy link

Elusive2K commented Mar 16, 2018

@valerensi that is a great solution, I have changed this too and it's working now, so thanks for that!

For other people the file can be found in: wp-content/plugins/woocommerce-pdf-invoices-packing-slips/templates/Simple/invoice.php
Or it is in you (child)theme directory: wp-content/themes/the-theme-folder/woocommerce/pdf/the-custom-template-name/invoice.php

Around line number #93 you will find: <span class="item-name"><?php echo $item['name']; ?></span>
Change this into: <span class="item-name"><?php echo qtranxf_gettext($item['name']); ?></span>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants