Certainly! Here's a step-by-step guide for Installing the sales ticker:

Step 1: Navigate to Store Themes and Edit Code
  1. Log in to your Shopify admin panel.
  2. From the left-hand menu, go to "Online Store" and then click on "Themes."
Step 2: Search for or Create the sales-ticker-widget.liquid Snippet
  1. In the Themes section, click on "Actions" for the theme you want to edit and select "Edit code."
  2. In the left sidebar, under the "Sections" or "Snippets" folder (whichever is applicable), search for a file named sales-ticker-widget.liquid.
  • If the file exists, proceed to Step 3.
  • If the file does not exist, proceed to create a new snippet with the name sales-ticker-widget.liquid.
Step 3: Add Snippet Code
  1. Open the sales-ticker-widget.liquid file for editing.
  2. Paste the following code into the snippet file:
  3. {%- capture collectionIdArr -%}
        {%- for collection in product.collections -%}
          {{- collection.id -}}{%- unless forloop.last -%},{%- endunless -%}
        {%- endfor -%}
      {%- endcapture -%}
        {% if pageType == 'product' %}
        {% else %}
        {% endif %}
        data-product="{{ product.id }}"
        data-tags="{{ product.tags | join: ',' }}"
        data-collections="{{ collectionIdArr }}"
        data-variant="{{ product.selected_or_first_available_variant.id }}"
Step 4: Call the Snippet on Product and Collection Pages
  1. On your product page and collection page templates, locate the section where you want to display the sales ticker widget.
  2. Use the following code to render the sales-ticker-widget.liquid snippet, passing the necessary data and the page type:
  3. {% render 'sales-ticker-widget', product: card_product, pageType: 'product' %}
    • Adjust the pageType parameter accordingly, using either 'product' or 'collection' based on the page type.
Step 5: Save Changes and Test
  1. Save the changes made to the sales-ticker-widget.liquid file.
  2. Test the sales ticker widget on both product and collection pages to ensure it displays correctly.