Insert date and time collection when ordering

  • Posts: 2
  • Thank you received: 0
4 years 7 months ago #317403

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

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
4 years 7 months ago #317419

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.

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

  • Posts: 26
  • Thank you received: 0
  • Hikashop Business
4 years 7 months ago #317473

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


-Hikashop 2.3.0-

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
4 years 7 months ago #317484

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:

['allow'] == 'future'
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.

The following user(s) said Thank You: jbvieren

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

  • Posts: 26
  • Thank you received: 0
  • Hikashop Business
4 years 7 months ago #317720

Hi Nicolas
it works fine !
thanks


-Hikashop 2.3.0-

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

Time to create page: 0.063 seconds
Powered by Kunena Forum