The cart page template
renders the shopping cart page where customers can check what they have added to their shopping cart, and then simply proceed for checkout. The general view of this page displays the list of the items added to the cart, so then the customer can modify any quantity or remove any item.
In addtion, can upload any files or attach any note along with the cart's items.Following is the page location and url:Example#
Variables#
Title of the page. May include html tags.
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.
Unique string for current cart to identify the cart.
is_require_shipping
boolean
optionalThis is to indicate if any item in the cart requires shipping. Some items needn't shipping eg. digital code will be sent to the mobile, or digital programs will be sent to the mobile as url.
To check if the shipping company has been selected.
Shipping cost can become free by an offer, coupon.
Real discount considering tax (this is only for display).
The sum of items price without shipping or other costs.
Total price of the items in the cart including shipping.
Free shipping bar details.
Components#
This page starts by displaying the breadcrumbs
component. The {% component breadcrumbs %}
line returns the current navigation for the user.JS Web Components#
Cart page may include the following JS Web Components, which are ready-made designs and style-sets of web components for Salla stores.Hooks#
The cart page template
calls for the following hooks in order to inject extra information.Usage#
The cart page template
consists of several parts, which are a form to display all of the cart's items/product, free shipping option, and any added discount.Using an HTML <form>
, the developer can display all of the items
added to the cart. All of the items can be displayed along with their options by using a for-loop statement as follows:Free shipping#
Using the variable cart.free_shipping_bar.has_free_shipping
, the developer may check if there is free shipping selected, and then build the logic to handle this part.Apply Copoun and discount#
Customer can also apply any given copoun in this page; however this is subject to the store settings which can be checked by the store.settings.cart.apply_coupon_enabled
variable. Accordingly, any given discount can be shown using the cart.real_discount
varible.Finally, the complete order within the cart page can sent using the following Salla component button: 
扫码加入 Apifox 微信交流群
在这里,获得 Apifox 使用上的任何帮助,快速上手让你的研测效率得到大幅提升

扫码加入交流群Modified at 2025-02-20 07:53:20