AbanteCart Community

eCommerce construction => Installation and Configuration => Configuration => Topic started by: ixl on August 17, 2025, 06:04:21 AM

Title: AC Version 1.4.2 - ORDER EMAIL TEMP & ORDER DOC TEMPLATE - PRODUCT IMAGES
Post by: ixl on August 17, 2025, 06:04:21 AM
Hi.

Probably been asked many times before, but I cannot see historically where this has been asked.

When a customer is placing the order, at the final cart page and in their order history, they can see a preview on the website showing details of the order in full, showing in the main grid:

IMAGE - DESCRIPTION - MODEL - SKU - UNIT PRICE - QUANTITY - TOTAL.

When I set up the site, I was of the impression the emails the customer gets, and order documents (that you can print from admin or from the account) show the main product image with the detail as explained above.  However these do not, its just a basic summary of the same info but without the image. EG

PRODUCT CODE - MODEL - QTY - UNIT PRICE - TOTAL.


Is there a way to get the image to show per order line, within the order email confirmation and printable order document in the same way as you can do from the site page?

Basically I want to have two templates, one email and one printable document that can show the product images at will.

See attached:

Invoice print version (no product image)
Email confirmation version (no product image)
Customer Webpage Invoice View - (has product image)




Thanks in advance.









Title: Re: AC Version 1.4.2 - ORDER EMAIL TEMP & ORDER DOC TEMPLATE - PRODUCT IMAGES
Post by: Basara on August 18, 2025, 01:50:29 AM
Hello,
You can customize the emails by navigating to Admin > Design > Email Templates. Look for the template named storefront_order_confirm to make your edits.
Title: Re: AC Version 1.4.2 - ORDER EMAIL TEMP & ORDER DOC TEMPLATE - PRODUCT IMAGES
Post by: ixl on August 18, 2025, 02:45:51 AM
Quote from: Basara on August 18, 2025, 01:50:29 AMHello,
You can customize the emails by navigating to Admin > Design > Email Templates. Look for the template named storefront_order_confirm to make your edits.

Hi, Yes I found the templates before I posted this, I should of stated that, sorry.  However there are no "hooks" so to speak to bring in the required linked images for each order line.

If someone can share the HTML code to do that, it would be appreciated.




Title: Re: AC Version 1.4.2 - ORDER EMAIL TEMP & ORDER DOC TEMPLATE - PRODUCT IMAGES
Post by: Basara on August 18, 2025, 07:27:03 AM
For SKU add sku to the Allowed Placeholders of the storefront_order_confirm template, then just use {{ sku }} in the email HTML.
See docs https://abantecart.atlassian.net/wiki/spaces/AD/pages/1529774103/Email+templates

For images, this is trickier. We plan to add support in 1.4.3, but for now you'd need to extend the data passed to the email in the model (https://github.com/abantecart/abantecart-src/blob/master/public_html/storefront/model/checkout/order.php#L367) to include product image URLs, then call them in your template.
Title: Re: AC Version 1.4.2 - ORDER EMAIL TEMP & ORDER DOC TEMPLATE - PRODUCT IMAGES
Post by: ixl on August 20, 2025, 01:59:21 AM
Thanks for the reply.

Quote from: Basara on August 18, 2025, 07:27:03 AMFor images, this is trickier. We plan to add support in 1.4.3, but for now you'd need to extend the data passed to the email in the model (https://github.com/abantecart/abantecart-src/blob/master/public_html/storefront/model/checkout/order.php#L367) to include product image URLs, then call them in your template.

This is what I am after but for the email template AND the confirmation PDF / Report as per OP.

The code (to a degree) is already being used or similar to show what I am after already within the website pages (as per the screenshot I shared in the OP in Order Details page), but its not in the email confirmations or document confirmation / invoice template which you would want to print and send with your order.

Is there a way to find this code thats already in place, so this could be adopted to both areas to the email and documents?