Salla Docs
Merchant API
  • Merchant API
  • Salla OAuth 2.0
Partner APIs
  • App API
  • Shipment API
Storefront
  • Twilight Engine
  • Twilight SDK
  • Web Components
  • Change Log
Salla CLI
Merchant API
  • Merchant API
  • Salla OAuth 2.0
Partner APIs
  • App API
  • Shipment API
Storefront
  • Twilight Engine
  • Twilight SDK
  • Web Components
  • Change Log
Salla CLI
Salla - Opensource
Salla - Developers Community
  1. Customer Pages
  • Getting Started
    • Create a theme
    • Develop a theme
    • Setup a theme
    • Publish a theme
  • Requirements & Review
    • Overview
    • Main Requirements
    • Review Process
      • UI / UX Review
      • Technical Review
      • Metadata Review
      • Pre-Launch Review
  • Files and Folders Structure
    • Directory structure
    • Twilight.json
  • Twig Template Engine
    • Basic syntax
    • Twilight flavoured twig
  • Theme Architecture
    • Layouts
      • Overview
      • Master Layout
      • Global Variables
      • CSS Variables
      • Salla Icons
      • Custom Fonts
      • Hooks
      • Localizations
    • Pages
      • Overview
      • Home Page
      • Product Pages
        • Products listing
        • Single product
      • Customer Pages
        • Profile
        • Orders list
        • Order details
        • Wishlist
        • Notifications
      • Blog Pages
        • Blog listing
        • Single blog
      • Brand Pages
        • Brands listing
        • Single brand
      • Common Pages
        • Cart
        • Loyalty
        • Thank you
        • Single page
        • Landing Page
    • Componenets
      • Overview
      • Home Components
        • Youtube
        • Fixed banner
        • Testimonials
        • Parallax background
        • Photos slider
        • Store features
        • Square photos
        • Fixed products
        • Products slider
        • Featured products - Style 1
        • Featured Products - Style 2
        • Featured Products - Style 3
        • Brands
        • Enhanced Square Banners
        • Main Links
        • Enhanced Slider
        • Slider Products with Headers
        • Latest Products
        • Vertical Menu with Slider
      • Product Components
        • Essentials
        • Options
      • Common Components
        • Header Components
        • Footer Components
        • Comments component
  • Change Log
  1. Customer Pages

Order details

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

Example#

Order details

Variables#

OrderDetailsPage
page
object 
optional
title
string 
optional
Title of the page. May include html tags
slug
enum<string> 
optional
Meaningful unique identifier that is readable by users. Slug are predifned valued in which each page has a list of allowed values. Below are the allowed values for this page.
Allowed value:
customer.orders.single
order
object (Order) 
optional
id
integer 
optional
Id of the order.
reference_id
integer 
optional
Id of the order.
created_at
string <date>
optional
Date when the order was created.
sub_total
number 
optional
The total price for each product in the order.
total
number 
optional
Total price of the order.
cod_cost
number 
optional
Cost of cash on delivery.
can_reorder
boolean 
optional
Ability to order the same order again.
can_cancel
boolean 
optional
Ability of cancelling the order.
can_rate
boolean 
optional
Ability of rating the order.
cancel_url
string 
optional
URL link of order cancelation.
payment_url
string 
optional
URL link of order payment.
shipping
object  | null 
optional
Order shipping object.
tax
object 
optional
Taxes applied on the order.
status
object 
optional
Order status.
items
array [object] 
optional
Items in the order.
discounts
array [object {2}] 
optional
Discounts applied on the order.
is_rated
boolean 
optional
Has the order been rated?
rating
object 
optional

Components#

This page extends the default layout 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.
In addition, the User model is accessible automatically on this page because it's included in the master.twig layout file.

JS Web Components#

Customer's Order Details page may include the following JS Web Components, which are ready-made designs and style-sets of web components for Salla stores.
Button <salla-button>
Rating Modal <salla-rating-modal>
Map <salla-map> (Read Only)
Modal <salla-modal>
Rating Stars <salla-rating-stars>

Hooks#

This single order page template allows calling the following hooks in order to inject more information:

Usage#

In the order's detailes page template, we need to show several element related to the 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.
After that, it's essential to display the list of the order's items/products. For this, we use a for-loop statement to show the details of each item/product:
An item/product within an order may contain several options as per the customer selection. These options can be displayed as follows:
In addtion to having product's options, there might be sub_products along with any item/product. Following, is an example for displaying any sub products:
Another point related to the order's items is having attached files or notes. These elements can be displayed using for-loop as we see in the following example:
Also, the array variable order.discounts can be retrieved to check if there is any discount added to the order as below:
Multiple checks can be done in order to show more details about the order that is currently being handeled. For example, the variable 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:
The order item can also be reordered using 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.
At this stage, the developer may show the cancellation option to the customer by using the variable order.can_cancel.
Note
The developer may use the Salla component salla-button in order to show buttons with actions. 
Another important section that can be added to this page is the order rating. Rating gives a better view for the useres on how popular the store and the shipping service are and how other customers liked them.
Order rating will enable the customer to rate the store and the shipping service by using the stars for rating.
Note
The 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
Previous
Orders list
Next
Wishlist