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. Product 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
    • Components
      • 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. Product Pages

Single product

The 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.
The main structure of this product page template is showing the product primary components, and then showing the related essential components, options components, and related offers components.
Following is the page location and url:

Example#

Single product

Variables#

SingleProductPage

Components#

This page starts by displaying the breadcrumbs component. The {% component breadcrumbs %} line returns the current navigation for the user:
In addition, the developer may show the product.offer component:
Also, the customers' comments on a specific product may be displayed using the component comments:
Similary, this page may show similar products to the current product using the component product.similar-products. This will make it more and more reachable for the customers:

JS Web Components#

Single Product page may include the following JS Web Components, which are ready-made designs and style-sets of web components for Salla stores.
Add Product <salla-add-product>
Button <salla-button>
Gifting <salla-gifting>
Installment <salla-installment>
Products Slider <salla-products-slider>
Quick Order <salla-quick-order>
Quantity Input <salla-quantity-input>
Rating Stars <salla-rating-stars>
Slider <salla-slider>
Social Share <salla-social-share>

Hooks#

In the single product template page, the developer displays the product details such as the title, description, color, size, price, and quantity. Each product will have its own details displayed on this page.
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:
In addition, the single product page template may call the following hooks in order to inject extra information:

Usage#

This page template starts with extracting main variables from the 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#

Initially, several variables, such as 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#

The variable 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)#

The important part of this page is the form for adding the product to the cart. This <form> basically consists of two main sections. The first section is to show the product's options, and the product price and quantity.
The 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.
The second section is to show the product price and availability. If the product is on sale, the variable 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.
The variables 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#

Merchants are able to introduce custom fields for the product, and you can render such fields by using the <salla-metadata> JS Web Component in the following manner:
Educational Clip
Modified at 2025-03-04 12:54:02
Previous
Products listing
Next
Customer Pages