For the complete documentation index, see llms.txt. This page is also available as Markdown.

Confirm delivery bag selection

Accepts the delivery bag product SKU and (optionally) a quantity. Calculates the final number of bags based on the DELIVERY_BAGS_CONF settings and stores the result in pre_order.data. This is an independent page — submitting it does not advance the checkout flow.

Fields:

  • product: SKU of the bag product. Must match DELIVERY_BAGS_CONF.sku. Must be an active product with product_type = miscellaneous.

  • quantity: Number of bags requested by the user. Only applicable when DELIVERY_BAGS_CONF.is_quantity_changeable is true. Must be >= DELIVERY_BAGS_CONF.min_quantity. Defaults to 0 if omitted (falls back to min_quantity).

Quantity Calculation:

  • When is_quantity_changeable is false: quantity is auto-calculated as ceil(total_amount / per_amount), floored at min_quantity. Items with the exclude_bag_attribute_name attribute are excluded from the total amount.

  • When is_quantity_changeable is true: the submitted quantity value is used directly.

State Update:

  • pre_order.data['bags']: list of the bag product repeated bags_count times.

  • pre_order.data['bags_fee']: calculated delivery bags fee.

Backward Navigation:

  • When navigating backward, bags and bags_fee are removed from pre_order.data.

Next Pages:

  • No further checkout page (EmptyPage)

post
Header parameters
x-requested-withstring · enumRequired

Required header for AJAX requests. Must be set to XMLHttpRequest for all checkout requests.

Default: XMLHttpRequestPossible values:
CookiestringOptional

Session cookie header (e.g. sessionid=abc123 or osessionid=<session_id>)

Body
productstringRequired

SKU of the delivery bag product. Must match the SKU configured in DELIVERY_BAGS_CONF.sku. The product must be active and have product_type = miscellaneous.

Example: DELIVERY-BAG-001
quantityintegerOptional

Number of bags requested by the user. Only used when DELIVERY_BAGS_CONF.is_quantity_changeable is true. Must be greater than or equal to DELIVERY_BAGS_CONF.min_quantity. Defaults to 0 if omitted, which falls back to min_quantity. Raises a validation error if is_quantity_changeable is false and a non-zero value is submitted.

Example: 3
Responses
200

Delivery bag selection confirmed or validation error

application/json
errorsone of · nullableOptional
or
string[]Optional
template_namestringOptional
post/orders/checkout/?page=DeliveryBagsPage
POST /orders/checkout/?page=DeliveryBagsPage HTTP/1.1
Host: sandbox.akinon.com
x-requested-with: XMLHttpRequest
Content-Type: application/x-www-form-urlencoded
Accept: */*
Content-Length: 30

"product='DELIVERY-BAG-001'"
200

Delivery bag selection confirmed or validation error

{
  "context_list": [
    {
      "page_name": "DeliveryBagsPage",
      "page_slug": "deliverybagspage",
      "page_context": {
        "bags_fee": "5.99"
      }
    }
  ],
  "pre_order": {
    "user_email": "user@akinon.com"
  },
  "errors": {},
  "template_name": "orders/checkout.html"
}

Last updated

Was this helpful?