How the Posterly helper script works

The helper script improves how we redirect customers to the product editor.

The Posterly helper script is a small pice of JavaScript that helps the app know if a product is linked to a design in Posterly. The script tells Posterly to redirect to the design editor, if a customer views the product page of a linked product. The helper script is small and light weight, so it won't affect your sites performance.

Installing the script manually

If you prefer to install the script manually, you need to copy the code snippet below and place it in the theme.liquid file of your theme, just above the </head> line:

{% if product %}<script type="text/javascript">const posterly_theme_vars = { design_id: '{{ product.metafields.posterly.design_id }}', sku: '{{ product.variants[0].sku }}' };</script>{% endif %}

Uninstalling the script

If you want to remove the helper script, even though you don't need to, even if you uninstall Posterly, you need to find the code snippet below and remove it. It is located in the theme.liquid file of your theme, just above the </head> line:

{% if product %}<script type="text/javascript">const posterly_theme_vars = { design_id: '{{ product.metafields.posterly.design_id }}', sku: '{{ product.variants[0].sku }}' };</script>{% endif %}

Didn't find an answer?

Contact Us
Getting Started
Product Features
Custom Input Fields
Design Elements
Customization