- Posts: 2
- Thank you received: 0
Insert date and time collection when ordering
6 years 6 months ago #317403
by Rudynelen
Insert date and time collection when ordering was created by Rudynelen
-- HikaShop version -- : 4.2.3
-- Joomla version -- : 3.9.16
-- PHP version -- : 7.2.28
-- Error-message(debug-mod must be tuned on) -- : Insert date and time collection when ordering
Hey,
I have made a webshop for pickups from a bakery.
If there are customers ordering, I would have liked to add the pickup date and time.
Where can I do that and how do I do that?
-- Joomla version -- : 3.9.16
-- PHP version -- : 7.2.28
-- Error-message(debug-mod must be tuned on) -- : Insert date and time collection when ordering
Hey,
I have made a webshop for pickups from a bakery.
If there are customers ordering, I would have liked to add the pickup date and time.
Where can I do that and how do I do that?
Please Log in or Create an account to join the conversation.
6 years 6 months ago #317419
by nicolas
Replied by nicolas on topic Insert date and time collection when ordering
Hi,
You can create custom fields of the table "order" via the menu Display>Custom fields. You can have one of the type "advanced date picker" for the date selection, and one of the type "single dropdown" for the selection of the time.
Note that I see you have the Essential edition, but custom order fields are only available with the Business edition. So you would have to upgrade to be able to do that :
www.hikashop.com/extensions/upgrade-my-version.html
After you've created the custom order fields, they will be displayed by the "Fields" view in your "Checkout workflow". So make sure you didn't remove that view from it.
You can create custom fields of the table "order" via the menu Display>Custom fields. You can have one of the type "advanced date picker" for the date selection, and one of the type "single dropdown" for the selection of the time.
Note that I see you have the Essential edition, but custom order fields are only available with the Business edition. So you would have to upgrade to be able to do that :
www.hikashop.com/extensions/upgrade-my-version.html
After you've created the custom order fields, they will be displayed by the "Fields" view in your "Checkout workflow". So make sure you didn't remove that view from it.
Please Log in or Create an account to join the conversation.
6 years 6 months ago #317473
by jbvieren
-Hikashop 2.3.0-
Replied by jbvieren on topic Insert date and time collection when ordering
Hi
I use a custom field to do that.
I configured it to propose only dates in the future and only Fridays and Saturdays.
It works pretty well (I can create an account for you if you want to see my website config).
You can also specify some forbidden dates.
I add a question here about a special need :
I'd like to be able to EDIT an order, and modify the date (even by selecting a date that the customer could not choose : in the past or a forbidden date for example).
But even an admin has the same constraints on this field.
Does anybody has an idea or a workaround to edit that field without updating in the database, or modifying temporarily the custom field configuration ?
thanks
I use a custom field to do that.
I configured it to propose only dates in the future and only Fridays and Saturdays.
It works pretty well (I can create an account for you if you want to see my website config).
You can also specify some forbidden dates.
I add a question here about a special need :
I'd like to be able to EDIT an order, and modify the date (even by selecting a date that the customer could not choose : in the past or a forbidden date for example).
But even an admin has the same constraints on this field.
Does anybody has an idea or a workaround to edit that field without updating in the database, or modifying temporarily the custom field configuration ?
thanks
-Hikashop 2.3.0-
Please Log in or Create an account to join the conversation.
6 years 6 months ago #317484
by nicolas
Replied by nicolas on topic Insert date and time collection when ordering
Hi,
You would have to modify the code in the file plugins/hikashop/datepickerfield/datepickerfield_class.php
There, you would need to modify each place (4 places) you have the code:
At each place, you'll have to check if you're in the backend or not.
It can be done with the hikashop_isClient('administrator') function call.
So with a bit of programming it's possible. However, note that you'll loose your changes when you update HikaShop.
Thus, the best would be to make a copy of that plugin and rename it differently (similarly the plugin code needed to be updated here and there) so that you would be safe in the long run with that change.
You would have to modify the code in the file plugins/hikashop/datepickerfield/datepickerfield_class.php
There, you would need to modify each place (4 places) you have the code:
Code:
['allow'] == 'future'
It can be done with the hikashop_isClient('administrator') function call.
So with a bit of programming it's possible. However, note that you'll loose your changes when you update HikaShop.
Thus, the best would be to make a copy of that plugin and rename it differently (similarly the plugin code needed to be updated here and there) so that you would be safe in the long run with that change.
The following user(s) said Thank You: jbvieren
Please Log in or Create an account to join the conversation.
6 years 6 months ago #317720
by jbvieren
-Hikashop 2.3.0-
Replied by jbvieren on topic Insert date and time collection when ordering
Hi Nicolas
it works fine !
thanks
it works fine !
thanks
-Hikashop 2.3.0-
Please Log in or Create an account to join the conversation.
Time to create page: 0.389 seconds