custom field datetime or php date API

  • Posts: 846
  • Thank you received: 92
10 years 3 months ago #199793

-- HikaShop version -- : 2.4.0
-- Joomla version -- : 2.5.28
-- PHP version -- : 5.x

I need to have custom field to manage date because i want to use some SQL query function that target datetime function / argument column name.
Since HKS don't support datetime storage when create date field type ( picker date) .
1-Does php API and Joomla php API has good function to convert all date store in text behave like real date ? in javascript we have momentjs but don't know about "php and joomla " API wrapper
2-Does it make sense that custom field support real datetime format for date ?
3-In a way joomla date store date in datetime type , why not take the same logic for custom field ?
4-Does advanced date pciker ll support hour:minute:second gui selection ?
Thank's

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

  • Posts: 26264
  • Thank you received: 4043
  • MODERATOR
10 years 3 months ago #199843

Hi,

1/ The best will be to ask the Joomla community for that.
2/ Not really, timestamp are working fine
3/ Because we are using timestamp and it's working fine
4/ No and it won't (like we already wrote several times). jqueryui.com/datepicker/

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: lionel75

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

  • Posts: 846
  • Thank you received: 92
10 years 3 months ago #201993

Hi
because i still study date in SQL -> php -> javascript .; i find that the same value store in MySql has a different view in the JOoùla Backend for custom field .
In this composite/blend capture screen : 3 capture screen
1- creation of field of name quand and jomla type "simple date picker "
2- list of custom field focus on the name quand
3- product page focus on the custom field view area



AS you can see some information missing ( the time in product page !!) .
So in a non edit mode ( view) all information appear ( date and time) and in edit mode ( <input>) time disseppear !!
IT is quiet disturbing , a non sense . Is this behaviour come from joomla or hikashop ?
it ll be not so stupid to add a non edit area to know the real value when edit AND save ? ( the edit area field quand ) ?




For understand how date is manage by hikashop and joomla it really need time and knowledge and many testings steps !!!

For give all information about the chain from mysql to html ,
1- the hks quand field in mysql has a SQL type TEXT and is "raw" rendering using an sql editor seem 2015-04-18 16:30:00 . I write "raw" with because the storage are binaries data ( blob ) for type text . .... so my mySQL editor to some work to convert binaries data ( can not be understand) to text data ( readeable can be understand ) .
2- Joomla ll be store this date in SQL storage using SQL type int(10) unsigned . So the SQL editor ll show storage values of 1429374600 . this value can be convert to 2015-04-18 16:30:00 using SQL or php function. In sql you ll have to use 2 function and a formated "scheme" ?
SELECT date_format(from_unixtime(joomla_fieldNameColumn_int16),_utf8'%Y-%m-%d %H:%i:%s') from joomla_tableName ;


After read my other post about date time picker , i understand we can format date in joomla level ( with the ini file) or hikashop level ( in the back end when use custom field ) and perhaps using another way like language override ( really bad ? menu name ? ) .
How can i change the <input> value format for the field quand in hikasop product edit mode ?
( if we can ....)




regard's

Attachments:
Last edit: 10 years 3 months ago by lionel75.

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

  • Posts: 26264
  • Thank you received: 4043
  • MODERATOR
10 years 3 months ago #201995

Hi,

The Simple date picker does not handle the time ; that's a fact which won't change.

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.
Last edit: 10 years 3 months ago by nicolas.

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

Time to create page: 0.068 seconds
Powered by Kunena Forum