Top

Product Discount Snippet Files

When Product Discount is installed, three files are automatically inserted into the main, published theme. If a mobile theme is added, or the theme is changed/updated, the snippet files will need to be added to the new theme.

Follow these steps to replace the files if they are missing:

  1. Duplicate themes, to create a backup copy.
  2. From "Shopify Admin", select Online Store.

    select online store 

  3. Select Actions.

    select actions 

  4. Select Edit HTML / CSS.

    select edit html / css 

  5. Under "Snippets", select Add a new snippet.

    add a new snippet 

  6. Enter shappify-sales-icon-product in the "Create a new snippet called" field.

    enter shappify-sales-icon-product 

  7. Select Create snippet.

    select create snippet 

  8. Copy and paste this code into the file:
    {% if product.metafields.inventory.ShappifySale == "true" %}
    <img class='shappify-sales-icon-product' src='//secure.shappify.com/apps/discount/icons/default/sale8.png' /><style> 
    .shappify-sales-icon-product{ 
     } 
    </style>
    {% endif %}

    copy and paste this code 

  9. Select Save.

    select save 

  1. Under "Snippets", select Add a new snippet.

    add a new snippet 

  2. Enter shappify-sales-icon-collection in the "Create a new snippet called" field.

    enter shappify-sales-icon-collection 

  3. Select Create snippet.

     Step2-3.png

  4. Copy and paste this code into the file:
    {% if product.metafields.inventory.ShappifySale == "true" %}
    <img class='shappify-sales-icon-collection' src='//secure.shappify.com/apps/discount/icons/default/sale10.png' /><style> 
    .shappify-sales-icon-collection{ 
    } 
    </style>
    {% endif %}

    copy and paste this code 

  5. Select Save.

    select save 

  1. Under "Snippets", select Add a new snippet.

    add a new snippet 

  2. Enter shappify-sales-clock in the "Create a new snippet called" field.

    enter shappify-sales-clock 

  3. Select Create snippet.

    select create snippet 

  4. Copy and paste the shappify-sales-clock code into the file.

    copy and paste this code 

  5. Select Save.

    select save 

Have more questions? Submit a request