Adding Smartrr to a custom page (Shopify Liquid)
How to add Smartrr to collection pages, landing pages, and custom snippet blocks within Shopify.
Last updated
Was this helpful?
How to add Smartrr to collection pages, landing pages, and custom snippet blocks within Shopify.
Last updated
Was this helpful?
Smartrr can be added to any collection page where a product form is present.
Add the {% render 'smartrr-product', product: product, smartrr_unique_id: product.id, smartrr_collection: true %}
snippet to the desired product form.
Ensure smartrr_unique_id
value is the product ID.
Add the {% render 'smartrr-product-styles %}
tag to the top of the collection page file.
Add the <script type="text/javascript" src="{{ 'smartrr-product-script.js' | asset_url }}"></script>
script tag to the collection page. Make sure this is placed before the {% render 'smartrr-product' %}
tag is rendered.
Smartrr can be added to any landing page where a product form is present AND you are able to manually pull in the liquid product object.
Add the {% render 'smartrr-product' %}
snippet to the desired product form alongside the smartrr_unique_id: product.id %
attribute.
Example:
Example:
Lastly, you can use custom liquid to pull in selling plan groups (a.k.a. subscription programs) and their selling plans (a.k.a. subscription plans). With this, you can loop through the selling plans to build a UI where selling plans can be selected. For more information on selling plan groups,
Make sure that the selling plan ID is being captured upon adding product to the cart. The selling_plan property is needed for the POST request to the cart API. For more information, .