Hi,
I'm trying to map some products custom fields created with metabox.io plugin.
It's an order template, the pdf is well attached to email. But custom fields are not displayed. I tried to paste them with visual mapper (they are in the list), and manually like this:
But it can be different with metabox.io as we didn't test it. If you still fail with render data attach please metabox.io plugin so we can install it and check on our side or you can submit support ticket with access details to WP Admin Dashboard here: https://e2pdf.com/support/request so we can login and try to recognize correct structure.
11 March, 2022 04:28:05
j.durand
Topics: 8
Messages: 29
Thank for the quick support!
No change with latest release.
I have another template using metabox but not Woocommerce, it works well with this code:
[e2pdf-wp key="mycustomfield_id" meta="true"]
If you can't help here I will send you admin access.
best regards
11 March, 2022 04:34:56
j.durand
Topics: 8
Messages: 29
Ok my bad. It works but only for simple products (my custom fields don't depend on attributes, they are the same for all options).
Other problem, if there is more than one product the pdf displays only the custom fields for the first product.
11 March, 2022 05:18:04
E2Pdf
Support
Topics: 7
Messages: 3574
If E2Pdf Template connected to WooCommerce Orders then attributes which you get from product must be controlled with "index" attribute as:
I understand. Tried (index="1) juste before your answer and works.
But only for simple products. I have many variable products (events), and still can't display fields content:
If so, then E2Pdf Template must be connected to "WooCommerce" -> "Variations" and [e2pdf-download id="1"], where 1 is the ID of that E2Pdf Template - must be added to "Variation" description instead of "Product" description or "dataset" must be set to "Variation ID" dynamically.
However you must keep in mind that E2Pdf can't currently dynamically show fields like "session" outside "Variable" product. It can show attributes only if it's part of "Variation", when "Ajouter au devis" is active.
11 March, 2022 07:41:06
j.durand
Topics: 8
Messages: 29
>> Do you wish to show PDF on frontend directly with the link below?
No, sorry for my poor english!
My issue is still the same as my first comment. The pdf is attached in order email. I can't display custom fields in the pdf for variable products. The link to my product was an example. The fields I need are simple text fields, the ones under "À propos de la formation".
Your code and visual mapper works for simple products but not for variable products.
"pa_attribute" must be replaced with your attribute key and must be available inside "Visual Mapper". If still not work, submit please support ticket with access details: https://e2pdf.com/support/request
11 March, 2022 07:46:26
E2Pdf
Support
Topics: 7
Messages: 3574
À propos de la formation?
If so, as we understand it's product data and not variable data. One more possible construction to set "parent" attribute to true to get data from parent product directly:
>> If so, as we understand it's product data and not variable data. One more possible construction to set "parent" attribute to true to get data from parent product directly
Yes!!! That's exactly what I tried to say with my poor vocabulary :)
parent="true" Works like a charm. Sorry for the wasted time and many thank for the quick, kind and efficient support!
11 March, 2022 08:27:23
j.durand
Topics: 8
Messages: 29
May be you could add "variable products" in the post title for better search results.
11 March, 2022 08:29:12
E2Pdf
Support
Topics: 7
Messages: 3574
Thanks. We will do. Glad to here that it was found solution.
We use cookies to collect and analyse information on site performance and usage, to provide social media features and to enhance and customise content and advertisements. By clicking "Accept Selected", you consent to use of selected cookies according our to our Cookie Policy.