Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Schedule order times need to update when pickup/delivery is toggled #348

Closed
olieydt opened this issue Apr 16, 2020 · 2 comments
Closed

Schedule order times need to update when pickup/delivery is toggled #348

olieydt opened this issue Apr 16, 2020 · 2 comments

Comments

@olieydt
Copy link

olieydt commented Apr 16, 2020

Expected behavior:
If a location has different pickup/delivery hours, ex:
Delivery: 12pm to 5pm
Pickup: 12pm to 8pm

When the page loads, the delivery times are loaded into the timepicker (12pm to 5pm). The button title shows "Set Delivery Time". If a user selects the pickup option, the times should update to 12pm to 8pm, and the button title should show "Set Pick-Up Time".

Actual behavior:
Toggling the delivery/pickup does not update the time picker or the time picker button title.

Reproduce steps:
Create a location with different delivery/pickup times. Toggle deliver/pickup and look at timepicker values.

Version:
Current master

Additional Information:
Could we somehow trigger the rendering of the @timeslot partial from the onChangeOrderType function in Cartbox.php?

@olieydt
Copy link
Author

olieydt commented Apr 16, 2020

Partial fix by returning this in onChangeOrderType:

return [
               '#notification' => $this->renderPartial('flash'),
               '#cart-items' => $this->renderPartial('@items'),
               '#cart-control' => $this->renderPartial('@control'),
               '#cart-totals' => $this->renderPartial('@totals'),
               '#cart-buttons' => $this->renderPartial('@buttons'),
               '#local-timeslot' => $this->renderPartial('localBox::timeslot'), //add this
            ];

@sampoyigi
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants