Order details
single order page template
can aid customers in viweing an order details such as items, prices, quantities and order status.
Example

Variables
OrderDetailsPage
page
object
optional
title
string
optional
slug
enum<string>
optional
Allowed value:
customer.orders.single
order
object (Order)
optional
id
integer
optional
reference_id
integer
optional
created_at
string <date>
optional
sub_total
number
optional
total
number
optional
cod_cost
number
optional
can_reorder
boolean
optional
can_cancel
boolean
optional
can_rate
boolean
optional
cancel_url
string
optional
payment_url
string
optional
shipping
object | null
optional
tax
object
optional
status
object
optional
items
array [object]
optional
discounts
array [object {2}]
optional
is_rated
boolean
optional
rating
object
optional
Components
master.twig
, and accordingly, it takes the unified look-and-feel. For example, all of the header's
and footer's
components will be added automatically to this page.User
model is accessible automatically on this page because it's included in the master.twig
layout file.JS Web Components
<salla-button>
<salla-rating-modal>
<salla-map>
(Read Only)<salla-modal>
<salla-rating-stars>
Hooks
single order page template
allows calling the following hooks in order to inject more information:
Usage
order
that is currently being handeled. For example below we have a table that shows the order's order.created_at
, order.shipping.logo
, order.shipping.name
, order.shipping.number
, order.status.name
. This is to disaply the shipping information of the order.
items/products
. For this, we use a for-loop statement to show the details of each item/product:
options
as per the customer selection. These options can be displayed as follows:
sub_products
along with any item/product. Following, is an example for displaying any sub products:
files
or notes
. These elements can be displayed using for-loop
as we see in the following example:
order.discounts
can be retrieved to check if there is any discount added to the order as below:
order.cod_cost
is evaluated to true in the case of selecting Cash on Delivery as the payment method.Also, the variable
order.shipping_cost
shows the shipping cost if there is any. Similarly, the variable order.tax
shows the amount of any added tax. The following is an example of all of the above variables:
order.can_reorder
. However, if the customer has not paid for the order yet, the page will redirected to the payment page via the variable order.payment_url
to finish the payment.salla-modal
and salla-button
are used in here to show the user a modal to choose either to reorder or to cancel.
order.can_cancel
.Note
salla-button
in order to show buttons with actions.
Order rating will enable the customer to rate the store and the shipping service by using the stars for rating.
Note
salla-rating-stars
component allows the developer to add a modal/button prompting customer to rate the order.
Modified at 2025-03-04 12:54:02