/
Basket

Basket

General display

When you click to place an order from the product page, a pop-up displays the basket. At this stage, you can either access the basket details or go directly to the payment page.

Clicking on “See basket” takes you to the basket shown below. You'll find a summary of the items ordered, any discounts, and the total. A search bar makes it easy to add new items to the basket.

Discount management

Without promotion engine

When no external promotion engine is connected to the Store App, the only way to automatically run promotions is to activate the "discount_limitations.use_compare_at_price": true configuration. So, promotions displayed are the difference between the "price" and "compare_at_price" fields.

Path : Configuration > Store App > Pages > Catalog > Specific settings > Options

{ "discount_limitations": { "use_compare_at_price": true } }

Then, manual discounts can be added by clicking on the pencil next to the price. By default, there are no restrictions. However, limits can be applied according to user roles by changing the configuration key "discount_limitations.limitations". The value entered for each role corresponds to the maximum percentage reduction allowed.

Path : Configuration > Store App > Pages > Catalog > Specific settings > Options

{ "discount_limitations": { "limitations": { "vendor": 30, "vendor_manager": 30 } } }

With the configuration shown in the example above, a salesperson wishing to add a manual discount of more than 30% will be refused.

Path : Configuration > Store App > Pages > Catalog > Specific settings > Options

{ "discount_limitations": { "limitations": { "vendor": 0, "vendor_manager": 0 } } }

To completely remove the right to add reductions, the limit must be set to 0. The pencil disappears from the basket page.

With promotion engine

To enable more agile and fluid management of discounts, an external promotions engine can be connected to Onestock. In order for the Store App to trigger a GET /promotions route call, the configuration key promotion_engine must be enabled.

Path : Configuration > Store App > Pages > Catalog > Specific settings > Options

{ "promotion_engine": true }

The Store App sends the entire order structure, including price and quantity information for each item, as a GET /promotions body. For a promotion to be applied, it must be returned in the order_items.pricing_details structure.

Currently, the mapping between information from the external promotion engine and the Store App is performed by our integration layer. For further information, please contact your Onestock contact.

If the promotion engine needs additional information from the user or store, you can add fields to the request body with the promotion_engine_request_params.external_parameters configuration key. Added fields must be valid paths in the endpoint or user structure, surrounded by % characters. See example below.

Path : Configuration > Store App > Pages > Catalog > Specific settings > Options

{ "promotion_engine_request_params": { "external_parameters": { "endpoint_id": "%endpoint.id%", "organisation": "%endpoint.information.organisation%", "user": "%user.id%" } } }