Skip to content
Log in

ProductComponent - Liquid Object Reference

On this page

Description

The ProductComponent object represents a component that can be included in a New Product Bundle. It defines the relationship between an anchor product and a component product with quantity rules and pricing.

:::note This object supports custom data via the data attribute. :::

Backed by

This drop renders the s_c__Product_Component__c Salesforce object. A theme writes it as product_component.

Liquid attribute Salesforce field
free_quantity s_c__Free_Quantity__c
max_quantity s_c__Max_Quantity__c
min_quantity s_c__Min_Quantity__c
position s_c__Position__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 product_component.data. See custom data fields in Liquid.

Attributes

Attribute Type Description
anchor_product Product Returns the anchor Product for this component
can_edit_quantity? Boolean Returns true if this component can have addable quantity
chargeable_quantity Number Returns the quantity that will be charged (accounting for free quantity)
component_pricing ComponentPricing Returns special bundle pricing for this component
component_product Product Returns the component Product
component_unit_price Number Returns the effective bundle price (Used for JS to reference the added price on the bundle)
default_quantity Number Returns the default quantity for this component
free_quantity Number Returns the quantity included free in bundle price
group ComponentGroup Returns the ComponentGroup this component belongs to
has_component_pricing? Boolean Returns true if this component has special New Product Bundle pricing
has_free_quantity? Boolean Returns true if this component has free quantity included
id String Returns the unique id of this ProductComponent
in_group? Boolean Returns true if this component belongs to a ComponentGroup
included_by_default? Boolean Returns true if this component is included and cannot be removed
max_quantity Number Returns the maximum quantity allowed for this component
min_quantity Number Returns the minimum quantity required for this component
optional? Boolean Returns true if this component is optional in the bundle
position Number Returns the display order position of this component
quantity_range String Returns the valid quantity range for this component
required? Boolean Returns true if this component is required in the bundle

Available on

Was this article helpful?

Was this article helpful?