Note: this feature is available in Pro, Expert and Enterprise plans.


Step 1: log in into your Shopify Admin
Step 2: click "Themes" in the left menu. 

Step 3: Click "Actions" and select "Edit code", or "Edit HTML/CSS"

Step 4: In the left bar, click on "Add a new snippet", and name it  wisepops.liquid
By doing so, you will write all the code specific to Wisepops into a dedicated place.

Step 5: In the left bar, select  theme.liquid 

Step 6: Copy the following code and paste it just before the </body> tag:

{% include 'wisepops' %}

Step 7: Open back the snippet wisepops.liquid, then copy the following code into the file:

<script type="text/javascript">
    window.WisePopsLoaderCallback = function(wisepops) {
      wisepops("properties", {
        productPrice: {{ product.price | default: "null" }},
        productTags: "{{ product.tags | join: ',' }}",
        productInventoryManagement: "{{ product.variants.first.inventory_management }}",
        productInventoryQuantity: {{ product.variants.first.inventory_quantity | default: "null" }},
        cartTotalPrice: {{ cart.total_price | default: "null" }}

Trigger a popup when cart value is below X

Step 1: Open your popup in the editor.
Step 2: Click "Display" and select "Custom properties"

Step 3
: Click "Add more rules" 

Step 4: input cartTotalPrice in the condition field, select "Less than" and input your condition.

Trigger a popup when item inventory is below X

Note: this works only if Shopify is managing your inventory

Same steps as in the first example. But replace cartTotalPrice by productInventoryQuantity:

Trigger a popup when item has specific tags

Use productTags to create your condition:

Trigger a popup when item price is above X

Use productPrice to create your condition:

Use other Liquid variables

You're free to use other Liquid variables in your targeting. To do so, update the script provided at the beginning of this tutorial. Each Liquid variable must be declared as follows:

NameOfTheVariableInWisePops: {{ LiquidVariableName | default: "null" }},

Visit Shopify website to get the full list of Liquid variables. And feel free to contact us if you need help with the setup.

Did this answer your question?