changing date format

  • Posts: 57
  • Thank you received: 2
  • Hikashop Business
2 years 11 months ago #332051

-- 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.

  • Posts: 81481
  • Thank you received: 13062
  • MODERATOR
2 years 11 months ago #332060

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.

  • Posts: 57
  • Thank you received: 2
  • Hikashop Business
2 years 11 months ago #332436

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.

  • Posts: 81481
  • Thank you received: 13062
  • MODERATOR
2 years 11 months ago #332445

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:

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.056 seconds
Powered by Kunena Forum