Hello everyone,
I am trying <img src="{$product.product_image}"/> in the PDF template HTML. But it fails.
How to add image type field to PDF template?
Thanks
Hello everyone,
I am trying <img src="{$product.product_image}"/> in the PDF template HTML. But it fails.
How to add image type field to PDF template?
Thanks
Are you copying the photo from the product catalog to the products module for each product you add to a quote?
Check in the PDF Manager, can you see the name of your product image field as an available field in the dropdown under Products?
If not, to have the image accessible you'll need to modify the PDF Manager to add a link to the product catalog so you can refer to it as something like:
{$product_catalog.product_image_c}
See Cédric Mourizard's post here for how to do that:
Hope this helps you get to your goal.
FrancescaS
Hi Ric Mital,
Please follow this article to create a custom smarty modifier https://support.sugarcrm.com/Knowledge_Base/PDF_Management/Adding_Dynamic_Images_to_PDF_Manager_Templates/
Once you have added that, use the below check to see if image exists and print it if found.
{if $product_catalog.product_image_c != "upload//"}
<img style="width: 380px; height: auto; max-height: 300px;" src="{$product_catalog.product_image_c|tmp_image_path}" alt="Custom Image (PC)" />
{/if}
Let us know if this helps.
Regards.
Hats
Hi Ric Mital,
Please follow this article to create a custom smarty modifier https://support.sugarcrm.com/Knowledge_Base/PDF_Management/Adding_Dynamic_Images_to_PDF_Manager_Templates/
Once you have added that, use the below check to see if image exists and print it if found.
{if $product_catalog.product_image_c != "upload//"}
<img style="width: 380px; height: auto; max-height: 300px;" src="{$product_catalog.product_image_c|tmp_image_path}" alt="Custom Image (PC)" />
{/if}
Let us know if this helps.
Regards.
Hats