URL on email

  • Posts: 121
  • Thank you received: 1
9 years 3 months ago #227279

-- HikaShop version -- : 2.4
-- Joomla version -- : 3.4.8

Hi,
I won't to change the order email; when I do an order in the email appeared the url of the site, I try to modify this code:

<?php
$url = $data->order_number;
$config =& hikashop_config();
if($config->get('simplified_registration',0)!=2){
	$url .= ' ( '.$data->order_url.' )';
}
echo JText::sprintf('ORDER_CREATION_SUCCESS_ON_WEBSITE_AT_DATE',$url,HIKASHOP_LIVE, hikashop_getDate(time(),'%d %B %Y'), hikashop_getDate(time(),'%H:%M'));?>

I remove
$url,HIKASHOP_LIVE
and into language file I delete %s relative of the url code, but in the email apperared this (check attachment). How can I do for remove the url?

Another question, how can I do for insert url site on world? Like numeber of order

Thanks
Matteo

Attachments:

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

  • Posts: 26233
  • Thank you received: 4036
  • MODERATOR
9 years 3 months ago #227303

Hi,

I suggest you to not modify the email but just touch the translation.
In "sprintf", you can use %2$s in order to select the second parameter ; as explained in the official PHP documentation (argument swapping)
php.net/manual/en/function.sprintf.php

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.
The following user(s) said Thank You: m.fontana

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

  • Posts: 121
  • Thank you received: 1
9 years 3 months ago #227703

Hi, your solution function, thanks. I try to change date format from this 2016-01-26 to 26-01-2016, so from %Y %B %d to %d %B %Y, but nothing happened, why?

Thanks
Matteo

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

  • Posts: 13201
  • Thank you received: 2322
9 years 3 months ago #227722

Hi,

So in this code of the order creation email ?

echo JText::sprintf('ORDER_CREATION_SUCCESS_ON_WEBSITE_AT_DATE',$url,HIKASHOP_LIVE, hikashop_getDate(time(),'%d %B %Y'), hikashop_getDate(time(),'%H:%M'));
For the original sentence:

We are pleased to confirm the creation of your order No. %s at %s on the %s at %s


And the date in this sentence is not displayed as you want ?

Please note that the format '%d %B %Y' is the default format.

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

Time to create page: 0.068 seconds
Powered by Kunena Forum