Change subject title email

  • Posts: 91
  • Thank you received: 3
10 years 9 months ago #143495

Hi, I'm curious where to find the code for the titles of the emails, and especially the variables.
In the language file I see: ORDER_CREATION_NOTIFICATION_SUBJECT="Your order No. %s is now %s at %s"

I want to know where is defined what the first %s will do, the second, et cetera.
I know it is order number, status and shop-URL, but where is that defined?

My specific goal this time is to change the third %s from URL of the shop to name of the shop (which is not used in Hikashop as far as I know, so I will have to create SHOP_NAME="")

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

  • Posts: 2334
  • Thank you received: 403
10 years 9 months ago #143508

Hi there,

The problem is that this translation will be call multiple times and it's pretty boring to replace the third argument every time.
So I could do a search on our project and give you every time it appears but you may not like the number of time you'll have to edit the file (and there might be some in core files). If you plan to use the name of the shop you could simply replace the last %s by the name of the shop in the translation, it should work fine :)

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

  • Posts: 91
  • Thank you received: 3
10 years 9 months ago #143513

OK, thanks for the workaround, but I'm still curious for the file involved. Because there must be one piece of code telling for this specific email which variables to load...

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

  • Posts: 2334
  • Thank you received: 403
10 years 9 months ago #143848

Sorry about the delay, it took a bit of time.
The function is actually called once in administrator/components/com_hikashop/classes/order.php

Here is the line:

$order->mail->subject = JText::sprintf($order->mail->subject,$order->order_number,$mail_status,HIKASHOP_LIVE);

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

Time to create page: 0.045 seconds
Powered by Kunena Forum