How to modify the Summary of your order in the invoice emails

  • Posts: 38
  • Thank you received: 1
7 years 3 months ago #277805

Hello,

I would like to add the product category into the email notifications, how do I go about adding this information?

I know the following views exist in the back-end:

Order creation notification - email used when an order is created. Send to the user itself.
Order status notification - email used when an order is modified (could be confirmed, cancelled, shipped...). Send to the user itself.
Order administrator notification - email used when an order is created. Send to the administrator.

I know where the views are located system --> emails

However, I don't know what to insert into the views. I know it's somewhere in the table code below, but where and what do I insert exactly?

<!--{START:PRODUCT_LINE}-->
<tr>
<td style="border-bottom:1px solid #ddd;padding-bottom:3px;">
{LINEVAR:PRODUCT_IMG}
{LINEVAR:PRODUCT_NAME}<!--{IF:ORDER_PRODUCT_CODE}--> {LINEVAR:PRODUCT_CODE}<!--{ENDIF:ORDER_PRODUCT_CODE}-->
{LINEVAR:PRODUCT_DOWNLOAD}
{LINEVAR:PRODUCT_DETAILS}
</td>
{LINEVAR:CUSTOMFIELD_VALUE}
<td style="border-bottom:1px solid #ddd;padding-bottom:3px;text-align:right">{LINEVAR:PRODUCT_PRICE}</td>
<td style="border-bottom:1px solid #ddd;padding-bottom:3px;text-align:right">{LINEVAR:PRODUCT_QUANTITY}</td>
<td style="border-bottom:1px solid #ddd;padding-bottom:3px;text-align:right">{LINEVAR:PRODUCT_TOTAL}</td>
</tr>

Thank you!

Last edit: 7 years 3 months ago by Saren_p.

Please Log in or Create an account to join the conversation.

  • Posts: 26166
  • Thank you received: 4029
  • MODERATOR
7 years 3 months ago #277817

Hello,

I'm afraid that it will require a consequent amount of PHP code in the email preload.
Because a product can have multiple categories ; you'll need to load all categories of the products in the order and use an algorithm to get just one single category per product (the first linked, the deepest... depends of your needs and configuration).
Then you'll have to made the category name information available in the "item" to be able to use a TAG in the content part of the email to display it.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 38
  • Thank you received: 1
7 years 3 months ago #277876

Thanks, Jerome.

What do you recommend as an alternative or a workaround then? I have different products in 2 different categories with the same name, picture and price. How can I differentiate what the product is exactly from the email invoices?

The back-end orders section provides the product name and product code, is this something that can be easily entered into the emails?

Last edit: 7 years 3 months ago by Saren_p.

Please Log in or Create an account to join the conversation.

  • Posts: 83025
  • Thank you received: 13404
  • MODERATOR
7 years 3 months ago #277893

Hi,

Yes. You can easily add the product code to the email by adding such tag next to the product name tag: {LINEVAR:PRODUCT_CODE}

Please Log in or Create an account to join the conversation.

  • Posts: 38
  • Thank you received: 1
7 years 3 months ago #278248

Jerome, Nicolas,

Unfortunately displaying the product code isn't enough for what I need, I really need to display the category of the product in the checkout page. How can I accomplish this?

Regards.

Please Log in or Create an account to join the conversation.

  • Posts: 83025
  • Thank you received: 13404
  • MODERATOR
7 years 3 months ago #278290

Hi,

That will require PHP coding. It require loading the category data from the database with a MySQL query so it's not that easy.
If you're not a developer and need that, you'll have to ask one to help you with that.
You can potentially contact our partners for that:
www.hikashop.com/home/our-partners.html

Please Log in or Create an account to join the conversation.

  • Posts: 38
  • Thank you received: 1
7 years 3 months ago #278380

Nicolas, understood, thanks.

On a related note, I turned on "Display product code" under Configuration --> Display.

As you can see in the image below, in the cart view, there is not much space between the product name and product code. How/where can I adjust the spacing between the product name and code?



Thanks,

Last edit: 7 years 3 months ago by Saren_p.

Please Log in or Create an account to join the conversation.

  • Posts: 26166
  • Thank you received: 4029
  • MODERATOR
7 years 3 months ago #278391

Hello,

You can use CSS or a view override ; it depends what you want to do exactly.
www.hikashop.com/support/documentation/1...ize-the-display.html

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 38
  • Thank you received: 1
7 years 3 months ago #278469

Thank you Jerome.

Please Log in or Create an account to join the conversation.

Time to create page: 0.068 seconds
Powered by Kunena Forum