- Structure
- Liquid Section
- Javascript
Cross Sell Bundle Settings Metaobject
Hide fields
Hide fields
If Bundle is set
active on the appList of Product References that are part of the Cross Sell Bundle
Add this snippet as a section in your theme to see the values of the metafield
Copy
{% liquid
assign app_namespace = 'app--67872686081'
assign cross_sell_bundle_config = product.metafields[app_namespace].cross_sell_products.value
assign active = cross_sell_bundle_config.active
%}
<p>
<strong>Active: </strong>
{{ active }}
</p>
<p><strong>Widget Settings:</strong></p>
<p>{{ cross_sell_bundle_config.widget_settings.value | json }}</p>
<p><strong>Discount:</strong></p>
<p>{{ cross_sell_bundle_config.discount.value | json }}</p>
<p><strong>Products:</strong></p>
{% for bundled_product in cross_sell_bundle_config.bundled_products.value %}
{% liquid
assign product_gid = product.id | prepend: 'gid://shopify/Product/'
assign bundled_product_properties = cross_sell_bundle_config.product_properties.value[product_gid]
%}
<p><strong>Product Title: </strong>{{ bundled_product.title }}</p>
<p><strong>Product Properties: </strong></p>
<p><strong>Bundle ID: </strong>{{ bundled_product_properties.bundle_id }}</p>
<p><strong>Quantity: </strong>{{ bundled_product_properties.quantity }}</p>
<p><strong>Available Variant Ids: </strong>{{ bundled_product_properties.variant_ids }}</p>
{% endfor %}
{% schema %}
{
"name": "FoxSell CSW Snippet",
"tag": "section",
"blocks": [],
"settings": [
],
"presets": [
{
"name": "FoxSell CSW Snippet"
}
]
}
{% endschema %}
This is Work in Progress. Stay Tuned!