Select Retail Store
Sets the selected retail store for click-and-collect order.
Configuration:
CHECKOUT_LIST_RETAIL_STORES: Controls whether retail stores are listed (static setting, default:True). WhenFalse, no stores are fetched or displayed.CHECKOUT_RETAIL_STORE_FILTERS: Filtering options for retail stores (default:{"by_stock": false}). Whenby_stockistrue, only retail stores with available stock for basket items are shown. Whenfalse, all active retail stores withclick_and_collect=Trueare displayed.DEFAULT_COUNTRY_CODE: Default country code used to populate country field in address contexts.
Address Handling:
Creates a
RetailStoreAddressobject from the selected retail storeUses billing address details (first name, last name) and user email
Sets
billing_and_shipping_sametofalse
Next Pages:
Shipping option selection page
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 billing address
Primary key of the selected retail store
Retail store selected successfully
POST /orders/checkout/?page=RetailStoreSelectionPage HTTP/1.1
Host: sandbox.akinon.com
x-requested-with: XMLHttpRequest
Content-Type: application/x-www-form-urlencoded
Accept: */*
Content-Length: 39
"billing_address=10&retail_store=5"Retail store selected successfully
{
"context_list": [
{
"page_name": "ShippingOptionSelectionPage",
"page_slug": "shippingoptionselectionpage",
"page_context": {
"shipping_options": []
}
}
],
"pre_order": {
"retail_store": {
"pk": 5,
"name": "Downtown Store"
},
"billing_address": {
"pk": 10
},
"shipping_address": {
"first_name": "John",
"last_name": "Doe",
"email": "john@akinon.com"
},
"billing_and_shipping_same": false
},
"errors": {},
"template_name": "orders/checkout.html"
}Last updated
Was this helpful?

