Download icon

5 September, 2022 01:57:18
kytong
Topics: 3
Messages: 16
Hi E2Pdf,

Thanks for your hints of having Download icon. I also tried to make the HTML button in my woocommerce page for the PDF link as below -

<a class="button" href='[e2pdf-download id="1" output="url"]' target="_blank" rel="noopener">Download PDF</a>

However, after I refresh the edit page, the " become &quot; and the link is not working (will link to my original product page but not the PDF).

<a class="button" href="[e2pdf-download id=&quot;1&quot; output=&quot;url&quot;]" target="_blank" rel="noopener">Download PDF</a>

The situation also happened in icon download. Do you have any solution for it please?

Thanks and regards,
Koey
5 September, 2022 02:46:44
E2Pdf
Support
Topics: 7
Messages: 3163
Hi,

Can you please add some screenshots so we can see where you are trying to add icon / or output a custom URL?

P.S. You can try to output the URL also as:

<a class="button" href="[e2pdf-download id=1 output=url]" target="_blank" rel="noopener">Download PDF</a>

or

<a class="button" href="[e2pdf-download id=1 output=url esc_url_raw=true]" target="_blank" rel="noopener">Download PDF</a>

We remain at your service.
We would really appreciate your feedback at WordPress.org!
5 September, 2022 03:01:46
kytong
Topics: 3
Messages: 16
Hi E2Pdf,

Thanks for your advice and it works!

The issue that I have is the quotation mark in my woocommerce product page description was changed to &quot; , which cannot correctly link to the PDF short code.

By the way, your code works perfect so my problem was solved.

Thanks and regards,
Koey
3 October, 2022 01:44:35
kytong
Topics: 3
Messages: 16
Hi E2Pdf,

Thanks for your last advice. Your code works perfect on the description of Woocommerce single product page.
I tried to put the E2PDF download link on my Elementor (other Wordpress plugin) template single product page today but it didn't work. The link will refer to the same Woocommerce product page (not the generated E2PDF). Below are the HTML code I adopted -

<a class="button" href="[e2pdf-download id=1 output=url esc_url_raw=true]" target="_blank" rel="noopener">Download PDF</a>
<a class="button" href="[e2pdf-download id=&quot;1&quot; output=&quot;url&quot;]" target="_blank" rel="noopener">Download PDF</a>
<a class="button" href="[e2pdf-download id=1 output=url]" target="_blank" rel="noopener">Download PDF</a>

Of cause, If I put these HTML code directly on the Woocommerce description content, it works properly. Do you know how to fix it?

In Elementor, there is a button function. Attached please find the screenshot of the setting. What should I put for the button link?


Thanks and regards,
Koey
3 October, 2022 03:09:28
E2Pdf
Support
Topics: 7
Messages: 3163
Hi,

Please update E2Pdf to the latest RC version (1.18.10). After the upgrade, you must be able to use the "Shortcode" widget instead of the "Button" with E2Pdf shortcode. Unfortunately, we can't technically hook "Button" widget to show the PDF download link.

Let us know please if it will work as expected. If not, attach please some additional information: which shortcode was used, is it used WooCommerce Product Template or a custom Product design with Elementor? etc?

We remain at your service.
We would really appreciate your feedback at WordPress.org!
3 October, 2022 04:13:17
E2Pdf
Support
Topics: 7
Messages: 3163
On your final page we see that you are using the "text" widget, but not the "shortcode" widget. Can you try with "shortcode" widget please?
We would really appreciate your feedback at WordPress.org!
3 October, 2022 04:17:36
kytong
Topics: 3
Messages: 16
Hi E2Pdf,

Oh great thanks for your help and hints! it solved and works properly! :)

Regards,
Koey