Skip to main content

changing date format

More
5 years 5 months ago #332051 by Machka
changing date format was created by Machka
-- HikaShop version -- : 4.4.1
-- Joomla version -- : 3.9.26
-- PHP version -- : 7.3.27
-- Browser(s) name and version -- : all
-- Error-message(debug-mod must be tuned on) -- : none

when entering a time for availability of a new product the date is displayed as yyyy.mm-dd.
How can I change this exactly otherwis, so Germans also understand?

thanks in advance
kind regards

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

More
5 years 5 months ago #332060 by nicolas
Replied by nicolas on topic changing date format
Hi,

The date format can be customized with translation overrides of these two keys:
HIKASHOP_DATE_FORMAT
HIKASHOP_EXTENDED_DATE_FORMAT
www.hikashop.com/download/languages.html#modify
The following user(s) said Thank You: Machka

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

More
5 years 4 months ago #332436 by Machka
Replied by Machka on topic changing date format
then theres only one thing left:
The customer can only declare the week of year, when the article will arrive. That means:
Bike 1 comes in week 16 of the year 2021 and another one in week 20 of the year. Any suggestions how to handle this?

please ;)

Kind regards

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

More
5 years 4 months ago #332445 by nicolas
Replied by nicolas on topic changing date format
Hi,

While you could use these date format overrides to handle this, that means that you'll see the week number for all the dates on your website instead of day + month, so that's not really practical.

So you'll have to do this with a view file override.
In the menu Display>Views, you would need to edit the view file "add_to_cart_ajax.php" (for the listings) and "quantity.php" (for the product details page) and change the line:
Code:
echo JText::sprintf('ITEM_SOLD_ON_DATE', hikashop_getDate($start_date, $this->params->get('date_format', '%d %B %Y')));
There you can see the date format: %d %B %Y
So change this to remove the day and month and add the week number. As per www.php.net/manual/en/datetime.format.php the week number should be available with the letter W
The following user(s) said Thank You: Machka

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

Time to create page: 0.174 seconds
Powered by Kunena Forum