Cart
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.
Example

Variables
CartPage
page
object
optional
title
string
optional
slug
enum<string>
optional
Allowed value:
cart
cart
object (Cart)
optional
id
string
optional
is_require_shipping
boolean
optional
has_shipping
boolean
optional
real_shipping_cost
number
optional
real_discount
number
optional
sub_total
number
optional
discount
number
optional
coupon
string | null
optional
total
number
optional
free_shipping_bar
object
optional
items
array [object]
optional
Components
breadcrumbs
component. The {% component breadcrumbs %}
line returns the current navigation for the user.
JS Web Components
Hooks
cart page template
calls for the following hooks in order to inject extra information.
Usage
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.Cart items form
<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
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
store.settings.cart.apply_coupon_enabled
variable. Accordingly, any given discount can be shown using the cart.real_discount
varible.
Educational Clip
Modified at 2025-03-04 12:54:02