Impact Theme: Add Cart Message For Tagged Products

Hello,

Can anyone please inform on how to have a cart message auto populate for each product having a specific tag?

Example- Show customer a “Note: Pre-order item” message in cart for each “Pre-Order” tagged product.

Impact 4.3.0

https://sifitoys.com/

Thanks,

Si-Fi Toys

To auto-populate a cart message for each product with a specific tag, such as displaying a “Note: Pre-order item” message in the cart for products with the “Pre-Order” tag, you’ll need to modify the Liquid code in your Impact theme. Here’s a general approach to achieve this:

  1. Access the theme editor: Go to your Shopify admin dashboard and navigate to “Online Store” → “Themes”. Find the Impact theme and click on the “Actions” dropdown, then select “Edit code”.

  2. Locate the cart template: In the theme editor, look for the file that controls the cart template. This is typically named cart.liquid or similar. Open it in the code editor.

  3. Find the cart item loop: Within the cart template code, search for the loop that iterates through each cart item. It may look like this:

{% for item in cart.items %}
  {% if item.product.tags contains 'Pre-Order' %}
    

Note: Pre-order item

  {% endif %}
  {% comment %} ... {% endcomment %}
{% endfor %}
1 Like