Solved

how to show a warning based on a certain vendor product page

3loow16
New Member
11 0 0

Hello, as the title suggests, I want to trigger a warning if the customer goes into a product page based on a certain vendor because the vendor would only ship to specific places and I want to highlight that to the customer as a warning.

Accepted Solution (1)

KevinXu
Tourist
5 1 0

This is an accepted solution.

{% assign p_vendor = product.vendor | downcase %}
{% if p_vendor == ' vendor_name' %}
  <div style="color: red;">
    <h1>This is a warning</h1>
  </div>
{% endif %}

View solution in original post

Replies 3 (3)

Bdelucca
Excursionist
16 2 3

Hello,

You can add a pop up to the product section or template.

Add this code in the code editor in shopify

<div style="position: absolute; top: 10px; right: 50%;">
<h1>This is a warning</h1>
</div>

 

KevinXu
Tourist
5 1 0

This is an accepted solution.

{% assign p_vendor = product.vendor | downcase %}
{% if p_vendor == ' vendor_name' %}
  <div style="color: red;">
    <h1>This is a warning</h1>
  </div>
{% endif %}

Yuliya_K
Shopify Partner
26 0 2

 

Hello,

 

Try the app Product Warnings on Checkout to create a warning pop up for your customers. You can create a warning for a certain product, for all products or for a specific collection. So in your case just create a smart collection with product vendor as a condition and target the warning to this collection.