Skip to main content

URL on email

10 years 10 months ago #227279 by m.fontana
URL on email was created by m.fontana
-- 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:
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
Code:
$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

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

10 years 10 months ago #227303 by Jerome
Replied by Jerome on topic URL on email
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.
The following user(s) said Thank You: m.fontana

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

10 years 10 months ago #227703 by m.fontana
Replied by m.fontana on topic URL on email
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.

10 years 10 months ago #227722 by Xavier
Replied by Xavier on topic URL on email
Hi,

So in this code of the order creation email ?
Code:
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.062 seconds
Powered by Kunena Forum