order notification email problem

  • Posts: 19
  • Thank you received: 0
9 years 3 months ago #211841

Hi
If I wanna add product-category to order notification email.
What can I do??

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

  • Posts: 2143
  • Thank you received: 747
9 years 3 months ago #211877

Hi,

This could become difficult because a product could be assigned to not just one but multiple categories.

See this post: www.hikashop.com/forum/orders-management...fication.html#199841
where Jerome says

About the product categories ; there is no tag for that so the best will be to edit the "preload" part of the email in order to add the value in the array, so you can use it afterwards as a tag.
Because a product can have several categories, the loading of that information require some special processing, specially to provide just one single value for the tag (which can't handle arrays).


Need help with customisations of layouts, style or other site development? PM me!
(Don't forget to turn on "E-mail notification of new messages" )

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

  • Posts: 82868
  • Thank you received: 13376
  • MODERATOR
9 years 3 months ago #211858

Hi,

It's not easy as the data is not loaded in the emails.
You'll have to edit the emails via the menu System>Emails and in the "preload" area, you'll have to add first a MySQL query to load the category_name of the categories in the hikashop_category based on their category_id that you would load based on the category_id of the entries in the table hikashop_product_category where the product_id value would correspond to the id of the product that you can get in the $product->product_id variable there. Then, you'll be able to loop through the results of your MySQL query and display the category name after the product name.
If you're a developer it should be quite easy to do.

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

Time to create page: 0.066 seconds
Powered by Kunena Forum