CartItem - Liquid Object Reference
On this page
Description
A CartItem represents a single line in the customer’s Cart. It always relfects a Product that the customer is purchasing, whether it be a regular product, a bundle, a subscription, or even shipping. Whatever the Product is, the CartItem always represents a single distinct configuration of that Product.
:::note
This object supports custom data via the data attribute.
:::
Backed by
This drop renders the s_c__Cart_Item__c Salesforce object. A theme writes it as cart_item.
| Liquid attribute | Salesforce field |
|---|---|
delivery_day |
s_c__Delivery_Day__c |
delivery_time |
s_c__Delivery_Time__c |
deposit_payment_mode |
s_c__Deposit_Payment_Mode__c |
quantity |
s_c__Quantity__c |
Every other attribute on this drop is derived by StoreConnect rather than read straight from one field. The Attributes section lists them all.
Fields you add yourself are not listed above. Expose one with a Custom Data Mapping record, then read it from cart_item.data. See custom data fields in Liquid.
Attributes
| Attribute | Type | Description |
|---|---|---|
bookable_event |
BookableEvent | Returns the BookableEvent for the CartItem |
bookable? |
Boolean | Returns true if the CartItem is for a bookable Product |
bundle_has_bookable_components? |
Boolean | Returns true if the Bundle has bookable components |
bundle_items |
List[CartItem] | Returns the items contained in the Bundle |
bundle_lead? |
Boolean | Returns true if the CartItem is the lead item in a Bundle |
custom_forms |
List[CustomForm] | Returns a list of CustomForms for this CartItem |
delete_path |
String | Returns a path that can be used in a delete link to delete the CartItem from the Cart |
edit_bundle_path |
String | Returns a path that can be used in a link to edit CartItem |
has_nested_bundle_items? |
Boolean | Returns true if the Bundle has nested bundle items |
id |
String | Returns the unique id for this CartItem |
in_bundle? |
Boolean | Returns true if the CartItem is part of a Bundle |
max_quantity |
Number | Returns the maximum valid quantity level for this CartItem |
min_quantity |
Number | Returns the minimum valid quantity level for this CartItem |
name |
String | Returns the name of the CartItem Product |
pickup_options |
List[PickupOption] | Returns a list of valid Pickup locations for this CartItem Product |
pricing |
ProductPricing | Returns the Pricing for this CartItem |
product |
Product | Returns the Product for this CartItem |
quantity |
Number | Returns the value of the Quantity attribute |
reserved_product? |
Boolean | Returns true if the CartItem is for a reserved Product |
shipping_methods |
List[String] | Returns a list of valid shipping methods for this CartItem |
Deliveries
Attributes related to delivery windows
| Attribute | Type | Description |
|---|---|---|
available_delivery_dates |
List[Timestamp] | Returns available delivery dates for the CartItem |
available_delivery_days |
List[String] | Returns available delivery days for the CartItem |
available_delivery_windows |
List[DeliveryWindow] | Returns available DeliveryWindows for the CartItem |
delivery_date |
Timestamp | Returns the selected delivery date for the CartItem |
delivery_day |
String | Returns the selected delivery day for the CartItem |
delivery_time |
String | Returns the selected delivery timeslot for the CartItem |
Weights
Attributes related to weights
| Attribute | Type | Description |
|---|---|---|
shipping_dimensions_unit |
String | Returns the unit of the shipping dimensions of the CartItem |
shipping_height |
Number | Returns the shipping height of the CartItem |
shipping_length |
Number | Returns the shipping length of the CartItem |
shipping_weight |
Number | Returns the shipping weight of the CartItem |
shipping_weight_unit |
String | Returns the unit of the shipping weight of the CartItem |
shipping_width |
Number | Returns the shipping width of the CartItem |
total_shipping_weight |
Number | Returns the total shipping weight of the CartItem |
Available on
- Cart - Liquid Object Reference —
adjustment_items,bookable_items,items,schedulable_items - CustomForm - Liquid Object Reference —
item - DeliveryOptions - Liquid Object Reference —
cart_item,line_item
Was this article helpful?
Thanks for your feedback! It helps us improve our docs.