Get Sample Product Page context
Returns the list of sample products available for selection, based on the offer/discount applications on the current basket. This page is shown when active campaigns include sample product discounts.
Preconditions:
Basket must not be empty
A shipping option must already be selected (
check_shipping_option_selected)
Skip Conditions:
Page is skipped if sample products have already been selected or declined (i.e.,
sample_productsorunwanted_sample_productsis set inpre_order.data)
Previous Page: ShippingOptionSelectionPage (or configured variant)
Next Page: PaymentOptionSelectionPage
Note: This page appears only when at least one active offer discount includes sample_product_discounts. If no such discounts are applied to the basket, this page will not appear in the flow.
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>)
Sample Product Page context retrieved
GET /orders/checkout/?page=SampleProductPage HTTP/1.1
Host: sandbox.akinon.com
x-requested-with: XMLHttpRequest
Accept: */*
Sample Product Page context retrieved
{
"context_list": [
{
"page_name": "SampleProductPage",
"page_slug": "sampleproductpage",
"page_context": {
"sample_products": [
{
"pk": 101,
"name": "Sample Moisturizer",
"sku": "SAMPLE-MOIST-001",
"base_code": "SAMPLE-MOIST",
"absolute_url": "/products/sample-moisturizer/",
"price": "0.00",
"retail_price": "0.00",
"currency_type": "try",
"price_type": "default",
"unit_type": "quantity",
"tax_rate": "18.00",
"in_stock": true,
"stock": 10,
"is_ready_to_basket": true,
"product_type": "simple_product",
"attributes": {},
"attributes_kwargs": {},
"extra_attributes": {},
"productimage_set": [],
"productvideo_set": [],
"form_schema": [],
"data_source": null,
"category": null
}
],
"allowed_quantity": 1
}
}
],
"pre_order": {
"user_email": "user@akinon.com",
"shipping_option": {
"pk": 1,
"name": "Standard Shipping",
"slug": "standard-shipping"
}
},
"errors": [],
"template_name": "orders/checkout.html"
}Last updated
Was this helpful?

