-
AuthorPosts
-
December 5, 2024 at 6:11 pm #1473031
Hi @enfold!
I have a question. I would like to add a “create PDF”-Button to a single page in my WooCemmerce-shop that I am using within the enfold-Theme.
This is the page where i want to add the button directly under the product-picture:I am using the PDF&Print-Plugin from BestWebSoft. It produces a shortcode that looks like this: [bws_pdfprint display=’pdf’]. Is that possible?
For the customization of the shop i am using plugins from plugin-republic. I first asked them for a solution and this is what they answered: “You’ll need to edit the single product page template. Some themes have page builders that can directly do this, but not sure if Enfold – the theme you are using has this. Couldn’t find anything online. You can reach out to the theme developers to see if there’s a way to do it with the builder.”
If you have any other solution or know someone to support me with this problem, please let me know.
Locking forward to your Feedback
Michael F Kraus
December 6, 2024 at 7:27 am #1473066Hey Michael F,
Thank you for the inquiry.
Where exactly would you like the print button to display? You can use template hooks to insert the button at various locations on the product page.
Example:
function ava_product_pdf_print_button() { echo do_shortcode('[bws_pdfprint display="pdf"]'); } add_action( '<a href="https://automattic.pxf.io/y2XdbN/" target="_blank" rel="nofollow">woocommerce</a>_before_single_product_summary', 'ava_product_pdf_print_button', 15 );
This may require a few css adjustments.
Best regards,
IsmaelDecember 9, 2024 at 5:19 pm #1473261Hi Ismael!
Thanks for your feedback!
The Button should be placed like shown here
And it should be so that the function can be added to different, but not all pages.
Thanks
Michael F KrausPS What does the “Hot-Link” mean?
- This reply was modified 1 week, 5 days ago by werbeagenturlauf.
- This reply was modified 1 week, 5 days ago by werbeagenturlauf.
December 10, 2024 at 1:36 pm #1473348Hi,
Thank you for the inquiry.
Did you try the hook? We can’t find the PDF button anywhere in the page and the screenshot above is not displaying. Please try to use platforms like Savvyify, Imgur or Dropbox to upload and share the screenshot.
Best regards,
IsmaelDecember 10, 2024 at 5:22 pm #1473369Hi Ismael,
okay i’ll try: https://img.savvyify.com/image/PDF-drucken.9xhmj
and this is what i put into child theme and funkctions.php:
function ava_product_pdf_print_button() {
echo do_shortcode(‘[bws_pdfprint display=”pdf”]’);
}
add_action( ‘woocommerce_before_single_product_summary’, ‘ava_product_pdf_print_button’, 15 );As there was no result i used snippets and placed the same code. Still no result.
Any other idea?
Best regards
Michael F.December 11, 2024 at 8:03 am #1473390Hi,
Thank you for the screenshot.
The PDF button is now visible below the product image. Please check the screenshot in the private field. Did you figure it out?
Best regards,
IsmaelDecember 11, 2024 at 1:23 pm #1473427Hi ISmael,
well the PDF-Button is shown via Widgets in sidebar. But still it only prints a short text from the discription at the buttom of the page.
This is what i wrote into PHP Function Snippet:
function ava_product_pdf_print_button() {
echo do_shortcode(‘[bws_pdfprint display=”pdf”]’);
}
add_action( ‘woocommerce_before_single_product_summary’, ‘ava_product_pdf_print_button’, 15 );IS that correct?
Thanks
Michael FDecember 12, 2024 at 5:22 am #1473460Hi,
Thank you for the update.
But still it only prints a short text from the discription at the buttom of the page.
We are not familiar with the PDF plugin and do not know how it retrieves content. Unfortunately, plugin compatibility is beyond the scope of our support. Please contact the plugin developers for further assistance.
Best regards,
Ismael -
AuthorPosts
- You must be logged in to reply to this topic.