Page 1 of 1

Desired delivery date

Posted: 10 Mar 2025, 17:36
by jagg1010
I need a calendar form where the customer can tell us when he would like to be delivered.

After racking my brain about how best to achieve this more or less the only meaningful solution I came up with is to add a new calendar - datetime form field. It's not perfect because of

1) When a customer have stored this date field one time (after his first order) and he comes back to the shop this 'old date from the last order' is already stored in his adress.
2) And his "last stored adress" will be prefilled in the next order he make (and shown readonly/closed) - see screenshot
This I think will always be a problem because that "Desired delivery date" there is a) always in the past and b) will certainly be overlooked from the the customer in the checkout process :(

Image

So here are a few ideas, in the hope that the customer will notice this date field with each new order and change it to the new delivery date.

3) Is it possible to
a) to start a new checkout from such a user always with a blank date field?
(so it's not prefilled with last Desired delivery date from last order)
b) show that user adress box always open (in edit state) - so the chance is a little higher that the customer sees this 'desired delivery date field'?

4) How can I validate such a calender form field so that it can't be in the past? So when it's prefilled from last/past order from this user it should be 'marked in red' because the date in there is from the past.

5) Are there better ways to include such 'desired delivery date' for the customer?

Re: Desired delivery date

Posted: 12 Mar 2025, 14:58
by Jan
Hi, all the form fields are a part of User address data, so in fact there is a problem to somehow reset it. But yes, there can be some way to modify the order php file and when ordering - to directly reset this field - or even per some plugin (but this needs to be done manually, e.g. when ordering, there are plugin events - in such plugin event - the data from user's address database needs to be loaded and edited).

Unfortunately, there are no validate rules for the date set in user's form address :-(

5) There can be many different ways
-such date can be even stored in checkout message. E.g. that you write in checkout some notice that users can write into the notice the date :idea:
- or e.g. to make template override of the checkout, add there a form field with date and with help of javascript e.g. paste the date into final checkout message, etc. Or to make override and store such value set in form field with help of some plugin, etc. :idea: