Single product
single product page template
is designated to view product details such as the title, description, type, color, size, price, and quantity. Each product will have its own details displayed on this page.
Example

Variables
SingleProductPage
page
object
optional
title
string
optional
slug
enum<string>
optional
Allowed value:
product.single
Product
object
Product
id
integer
optional
name
string
optional
Example:
HUAWEI Band 6 Smart Band 96
description
string
optional
Example:
Light material for designed to your comfort while exercising.
url
string
optional
promotion_title
string
optional
subtitle
string
optional
type
enum<string>
optional
Allowed values:
productservicegroup_productscodesdigitalfooddonating
status
enum<string>
optional
Allowed values:
saleout
weight
string | null
optional
calories
integer | null
optional
sku
string | null
optional
rating
object
Rating | null
price
number
optional
sale_price
number
optional
regular_price
number
optional
starting_price
number | null
optional
Example:
Price start from ٨٣٠ ر.س
quantity
integer | null
optional
Example:
500
sold_quantity
integer
optional
Example:
450
max_quantity
integer
optional
Example:
1000
discount_ends
string | null
optional
is_taxable
boolean
optional
category
object | null
optional
image
object
optional
images
array [object {5}]
optional
brand
object | null
optional
tags
object (Tag)
optional
options
object (ProductOption)
optional
notify_availability
object
optional
donation
object
object | null
has_read_more
boolean
optional
can_add_note
boolean
optional
can_show_remained_quantity
boolean
optional
can_show_sold
boolean
optional
can_upload_file
boolean
optional
has_custome_form
boolean
optional
Food
or Custom Service
product.has_options
boolean
optional
is_on_sale
boolean
optional
is_hidden_quantity
boolean
optional
is_available
boolean
optional
is_in_wishlist
boolean
optional
is_out_of_stock
boolean
optional
is_require_shipping
boolean
optional
product.base_currency_price
number
optional
discount_percentage
number | null
optional
product.has_3d_image
boolean
optional
has_size_guide
boolean
optional
is_giftable
boolean
optional
add_to_cart_label
string
optional
Components
breadcrumbs
component. The {% component breadcrumbs %}
line returns the current navigation for the user:
product.offer
component:
comments
:
product.similar-products
. This will make it more and more reachable for the customers:
JS Web Components
<salla-add-product>
<salla-button>
<salla-gifting>
<salla-installment>
<salla-products-slider>
<salla-quick-order>
<salla-quantity-input>
<salla-rating-stars>
<salla-slider>
<salla-social-share>
Hooks
In some cases, the product may include "extra" services related, for example, to the payment services. Using hook
{% hook 'product:single.description.start' %}
in the single product code shows these extra services, as we see in the following example:
single product page template
may call the following hooks in order to inject extra information:
Usage
product
object, such as product title and id. Using this. object, the developer has the ability to perform many tasks related to the product page, as we will see in the following parts.Product description
product.promotion_title
, product.brand
, product.name
, product.rating
, product.subtitle
, product.description
, and product.tags
, can be used by the developer to display multiple pieces of information about a single product.
Product images
product.images
contains the product's several images, which can be displayed using a for-loop statement.
Add product to the cart form (Options and Quantity)
<form>
basically consists of two main sections. The first section is to show the product's options, and the product price and quantity.product.options
uses a for-loop
statement in order to show each available option for the product. Both hooks {% hook 'product:single.form.start' %}
and {% hook 'product:single.form.end' %}
are enclosing this part.product.is_on_sale
returns the boolean value true. The developer can use the if
statement to check that and then display product.price
, product.sale_price
, product.regular_price
, or any other value as needed.product.sold_quantity
and product.can_show_remained_quantity
reflect the available quantity of the product. The developer may display the product's price along with its available quantity after checking if product.is_available
is true. It is worth mentioning here that the variable product.notify_availability
can be checked in order to give the user the option of being notified about receiving a new quantity of that product.
Product Meta Data
<salla-metadata>
JS Web Component in the following manner:
Educational Clip
Modified at 2025-03-04 12:54:02