'NEW_ORDER_SUBJECT' not getting 'translated'

  • Posts: 195
  • Thank you received: 5
  • Hikashop Business
11 years 8 months ago #97376

I've got a site (HS Business 2.1.1) where the admin email notices are being sent and the subject line is appearing as "NEW_ORDER_SUBJECT" and not getting 'translated' into the "New order No. %s created on %s" as specified in the language file.

All other email subject lines are being handled properly.

Looks like a JText entry is missing, but I have no idea where to look (and wonder why other emails would be having their subjects handled properly).

Any ideas?

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

  • Posts: 13201
  • Thank you received: 2322
11 years 8 months ago #97404

Hi,

Thanks to check in Config > Languages, edit your language file and see id the string NEW_ORDER_SUBJECT is present.
If not, you can add it, and add the translation between double quotes.

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

  • Posts: 195
  • Thank you received: 5
  • Hikashop Business
11 years 8 months ago #97424

As noted in my first post, it isn't using what's in the language file.
And I checked the syntax there multiple times.
(I've translated commercial Joomla apps,so I'm pretty familiar with the language files).

It has:

NEW_ORDER_SUBJECT="New order No. %s created on %s"

at the bottom of the ;email content section

NOTE: This site was customized by a previous developer (on an older version of HS) so my guess is that he might have manually edited that code IF there some code specifically for this email notice. (And it looks an awful lot like the JText isn't there or is somehow got some wrong syntax).
IF there is a specific php file for this email form (that addresses the subject line) I'd love to know so that I can take a look at it.

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

  • Posts: 13201
  • Thank you received: 2322
11 years 8 months ago #97486

Hi,

This JText is in the file "administrator/components/com_hikashop/classes/order.php" near the line 350.

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

  • Posts: 195
  • Thank you received: 5
  • Hikashop Business
11 years 8 months ago #97601

Very strange.

The order.php file has (at line 345-347):

if(empty($order->mail->subject)) {
$order->mail->subject = JText::sprintf('NEW_ORDER_SUBJECT',$order->order_number,HIKASHOP_LIVE);
}

and the en-GB.com_hikashop.ini file (at line 649, in the ";email content" section) has:

NEW_ORDER_SUBJECT="New order No. %s created on %s"

So this sure looks like it should be working.

Any other ideas?

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

  • Posts: 13201
  • Thank you received: 2322
11 years 8 months ago #97662

Can you try to remove the "if" condition around: $order->mail->subject = JText::sprintf('NEW_ORDER_SUBJECT',$order->order_number,HIKASHOP_LIVE);

To force the use of the JText ?

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

Time to create page: 0.076 seconds
Powered by Kunena Forum