Set Delivery Option
Sets the selected delivery option to the current pre-order.
Configuration:
CHECKOUT_DELIVERY_OPTION_SELECTION_PAGE: Determines which delivery option selection page is used. Can be set toDeliveryOptionSelectionPageorRemoteDeliveryOptionSelectionPage.
Next Pages (based on selected delivery option):
If scheduled delivery is active:
SlotSelectionPageIf pickup location selected:
PickupLocationSelectionPageIf retail store selected:
RetailStoreSelectionPageOtherwise:
AddressSelectionPage
Cascading Invalidation:
Changing delivery option with
clear=trueresets shipping and billing addresses
Required header for AJAX requests. Must be set to XMLHttpRequest for all checkout requests.
XMLHttpRequestPossible values: Session cookie header (e.g. sessionid=abc123 or osessionid=<session_id>)
Primary key of the selected delivery option
If true, clears shipping and billing addresses when changing delivery option
falseDelivery option set successfully
POST /orders/checkout/?page=DeliveryOptionSelectionPage HTTP/1.1
Host: sandbox.akinon.com
x-requested-with: XMLHttpRequest
Content-Type: application/x-www-form-urlencoded
Accept: */*
Content-Length: 35
"delivery_option=1&clear=false"Delivery option set successfully
{
"context_list": [
{
"page_name": "AddressSelectionPage",
"page_slug": "addressselectionpage",
"page_context": {
"addresses": [],
"country": {
"pk": 1,
"code": "US",
"name": "United States"
}
}
}
],
"pre_order": {
"delivery_option": {
"pk": 1,
"name": "Home Delivery",
"delivery_option_type": "customer"
}
},
"errors": {},
"template_name": "orders/checkout.html"
}Last updated
Was this helpful?

