Printout related product in Email statu

  • Posts: 155
  • Thank you received: 4
6 years 3 months ago #285193

-- HikaShop version -- : 3.2.2

Hallo.

I want to show related products of the ordered products in an email which i send when order is arrived to customer.
This email is a notification where i ask the customer a review of his experience with us and i would like to show some related products of the ordered ones.

i already copied the

..../media/com_hikashop/mail/order_status_notification.html.php

file and modified it to my needs.
i would like to have this:
tr>
    <td style="font-family: Century Gothic, Arial, Helvetica, sans-serif; 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}
    </td>
    <td style="font-family: Century Gothic, Arial, Helvetica, sans-serif; border-bottom:1px solid #ddd;padding-bottom:3px;text-align:right">{LINEVAR:PRODUCT_PRICE}</td>
filled up with related products.
Do i have to modify the preload file to get the information? If yes could you give me a notice which part i have to copy/modify ?

Thanks for you reply

Last edit: 6 years 3 months ago by Cattelan.

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

  • Posts: 81539
  • Thank you received: 13069
  • MODERATOR
6 years 3 months ago #285196

Hi,

You will have to modify the preload yes.
The HTML version is only to arrange the data with the HTML tags.
But there are no tags to display the related products of the products in the order.
So you'll have to edit the preload to add such tag and load the data of the related products in them.
You'll basically have to use $data->cart->products to get the products and then run some MySQL queries to get their related products and their data. And then add that in the $vars array with the tag you want.

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

Time to create page: 0.056 seconds
Powered by Kunena Forum