Show all products gallery images dynamically

WooCommerce Bug Resolved
March 08, 2024 04:05:05
John Green
Topics: 2
Messages: 7
Dear sirs.
I am trying to show all pictures from a product gallery.

If I try to do this with a single image:
---------
<p>Show URL: [e2pdf-wc-product key='get_gallery_image_ids' path='1' attachment_image_url='true' size='full']</p> -> This shows the Image URL

<p>Problem: <img src="[e2pdf-wc-product key='get_gallery_image_ids' path='1' attachment_image_url='true' size='full']" width="100px" height="100px"></p><br> -> I try to use the ImageURL to show inside HTML field but it does not appear.
---------
After that I would like to show dynamically all the pictures (gallery) from a product.
Can you help me please?

Best regards.
March 08, 2024 05:03:40
E2Pdf
Topics: 7
Messages: 3614
Support
Hello,

It seems we could replicate the issue on our side and already released an update with the latest RC version 1.23.06. Please follow the steps here to update: https://e2pdf.com/docs/install#rc-version

Please, let us know if the issue will be resolved.

P.S. As a tip, if you need to output all images in the "HTML" object, you can use [e2pdf-for] shortcode:

[e2pdf-for]
[e2pdf-data][e2pdf-wc-product key='get_gallery_image_ids' attachment_image_url='true' size='thumbnail'][/e2pdf-data]
[e2pdf-do]
<img src="[e2pdf-wc-product key='get_gallery_image_ids' path='[e2pdf-for-key]' attachment_image_url='true' size='thumbnail']">
[/e2pdf-do]
[/e2pdf-for]

We would really appreciate your feedback at WordPress.org!
March 08, 2024 06:55:55
John Green
Topics: 2
Messages: 7
Dear sirs.

Thank you very much indeed for your fast answer. I updated and now it is working.

I tried the code you suggest me as tip, and it works, but if I try to show pictures bigger (instead of "thumbnail" I use "full") it is not working. Probably I am doing something wrong but, Could you check it?

Thank you very much and best regards.
March 08, 2024 06:59:17
John Green
Topics: 2
Messages: 7
UPDATE.

I tried with this code and now it is working.

[e2pdf-for]
[e2pdf-data][e2pdf-wc-product key='get_gallery_image_ids' attachment_image_url='true' size='full'][/e2pdf-data]
[e2pdf-do]
<img src="[e2pdf-wc-product key='get_gallery_image_ids' path='[e2pdf-for-key]' attachment_image_url='true' size='full']" width="100px" height="100px">
[/e2pdf-do]
[/e2pdf-for]

I hope it can help.

Best regards.
March 08, 2024 07:09:32
E2Pdf
Topics: 7
Messages: 3614
Support
Yes, indeed, setting "width" and "height" was required. Without setting the width and/or height, E2Pdf will try to render with the original size, and if the block doesn't have enough space - images will be truncated.

Glad to hear that the issue has been resolved.

We would really appreciate your feedback at WordPress.org!
Get News and Updates
Our monthly newsletter keeps you in the loop, so you'll always be up to date with the latest news and updates about E2Pdf.
* You can update your email subscription preferences here.
All trademarks, service marks, trade names, product names, and logos appearing on this website are the property of their respective owners. The use of trademarks such as Formidable Forms®, Forminator Forms®, Gravity Forms®, JetFormBuilder®, WordPress®, WooCommerce®, WPForms® and others is solely for identification purposes (nominative use) and does not imply any affiliation, sponsorship, or endorsement by the respective trademark holders.
© 2017 - 2026, https://e2pdf.com

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 to our Cookie Policy.