- Posts: 43
- Thank you received: 1
Custom filed: date from a beginning to an end
- markespositi
-
Topic Author
- Offline
I need a custom field which allows only date from a starting date to an end date.
ie. from 01/01/2013 to 31/12/2015.
Any suggestion? Thanks
Please Log in or Create an account to join the conversation.
We have a commercial plugin for that. it's called date picker. more information here: www.hikashop.com/component/hikashop/prod...iguration-screenshot
it should do what you are looking for!
Please Log in or Create an account to join the conversation.
- markespositi
-
Topic Author
- Offline
- Posts: 43
- Thank you received: 1
Anyway, after installation I receive the following error in every "custom filed":
Field type: Warning: Missing argument 2 for plgHikashopDatepickerfield::onFieldsLoad() in /var/www/vhosts/quidline.com/httpdocs/stage/shop/plugins/hikashop/datepickerfield/datepickerfield.php on line 19
Can you help me? Thanks
Please Log in or Create an account to join the conversation.
Which HikaShop version number are you using ?
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
- markespositi
-
Topic Author
- Offline
- Posts: 43
- Thank you received: 1
Please Log in or Create an account to join the conversation.
The current last HikaShop version is : 2.3.0
The current stable HikaShop version is : 2.2.3
The custom field datepicker extends the options displayed during the edition of a custom field, so it require a quite recente HikaShop version in order to work properly. The 2.1.3, released in May 2013 does not handle the possibility to extend the options of custom fields ; the plugin won't be able to work properly unless to update your website.
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
- markespositi
-
Topic Author
- Offline
- Posts: 43
- Thank you received: 1
I have also:
- Php v.5.3.2
- Zend Engine v.2.3.0
It return the same error:
Field type: Warning: Missing argument 2 for plgHikashopDatepickerfield:: ........ on line 19
Any idea? Thanks
Please Log in or Create an account to join the conversation.
Do you confirm that the line 19 in the datepicker is
I do not see how and why this second argument is not passed.
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
- markespositi
-
Topic Author
- Offline
- Posts: 43
- Thank you received: 1
field.php is attached here. Thanks.
Please log in or register to see it.
Please Log in or Create an account to join the conversation.
The file is good, you have the good line.
So I really don't know why you have this error, it is the only place where this trigger is called and there are two parameters given.
Do you have a link to your website where I will be able to see the problem ?
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
- markespositi
-
Topic Author
- Offline
- Posts: 43
- Thank you received: 1
Now, I have problems on labels names as you can see in the attachment.
Is the label named like you see, like "Date_picker_opt_default_today" and so on?
2)
I need instruction or manual or somethingh similar to understand the purpose of each fields? Have you got anythingh about it?
Thanks.
Please Log in or Create an account to join the conversation.
- markespositi
-
Topic Author
- Offline
- Posts: 43
- Thank you received: 1
Please Log in or Create an account to join the conversation.
The datepicker comes with an english language file.
Can you please check that the file "en-GB.plg_hikashop_datepickerfield.ini" exist in your website ?
I will try to reproduce your problem, see how the language file can not be loaded correctly.
If the problem still persists, you could copy the content of this language file into the HikaShop language override. At this moment you will be sure that the language content will be loaded.
The option "excludes" allow you to exclude specific dates ( 02/25/14 ) or date ranges ( 02/25/14-02/28/14 ). To exclude several years, you have to exclude several months ( 02/14-02/16 )
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
- markespositi
-
Topic Author
- Offline
- Posts: 43
- Thank you received: 1
1) which is the path of en-GB.plg_hikashop_datepickerfield.ini ?
2) We are getting crazy with "excludes" options. We need to allow only 2013, 2014, 2015 and to exclude years before and years after. Can you suggest us what to write in the exclude options? Thanks
Please Log in or Create an account to join the conversation.
You can use these translation, I am currently making some test on the plugin.
The plugin hasn't been designed for including dates, mostly for exclude some.
I have to test it in order to confirm it but you should be able to use :
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
- markespositi
-
Topic Author
- Offline
- Posts: 43
- Thank you received: 1
01/1900-12/2012
01/2016-01/2100
as you suggested, it doesn't work.
It doesn't work with:
03/2013-04/2013
It works with 01/26/2012-12/31/2012
It doesn't work with 01/25/2012-12/31/2012 (which means there is a bug in the software related to the today date)
Can you check and solve, please? Thanks a lot.
Please Log in or Create an account to join the conversation.
- markespositi
-
Topic Author
- Offline
- Posts: 43
- Thank you received: 1
Thanks
Please Log in or Create an account to join the conversation.
I am sorry, in my previous message, the date range restriction was in 2 parts but when in 2 parts it use the "day/month" format, not the "month/year".
So you need to use a 3 parts restrictions "d/m/y" (or "m/d/y" depending the element in the configuration just before).
For the tests I made, it worked good.
The plugin convert the date into a unix timestamp so depending your platform, the timestamp can't work great before 1970.
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
- markespositi
-
Topic Author
- Offline
- Posts: 43
- Thank you received: 1
Anyway, after the user have selected a date, he/she can enter the field and modify it. This is not good.
To be really useful "DatePicker add-on software" would avoid that.
So, we added a READONLY attribute to the "input tag" (line 381)
Regards
Please Log in or Create an account to join the conversation.
Right but no.
The datepicker have some checks in JavaScript and PHP so if the user modify the date manually, the JavaScript can check it and even if the script is not running, the PHP in the plugin will reject the value as an incorrect value.
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.