Solved

Envy theme need to add text next to price by tags

shopafterhour
Tourist
34 0 1

Hi,

 

I'm trying to add text "dozen" next to price in collection page for any product that contains tag "dozen" and also need "pcs" as well for "pcs" tags.

 

I tried below code on  complementary-product-card.liquid and template--product.liquid but did not work.

 

<div>
{%- if product.tags contains 'Dozen' -%}
<span class="product-grid--pricing--price-per-unit">Dozen</span>
{% endif %}
</div>

 

I'm able to add text on all product by using but certain item needs to be stated as box or pcs.

 

.product-grid--pricing--price-per-unit:after {
content: "BOX";
position: relative;
right: 20px;
bottom: 20px;
color: red;
}

 

 

Can anyone help with this?

 

website: https://waycaps.com/collections/new-arrivals

need to display like below after the price

shopafterhour_0-1714673083125.png

 

Accepted Solution (1)

Sweet_Savior_3
Shopify Partner
1163 94 112

This is an accepted solution.

Hello @shopafterhour 

 

Welcome to Shopify Community.

 

Did you added in the correct file ? 

Because the code you gave is correct. If possible to provide the access to code editor to check do let me know.

 

Thanks

Don't forget to like and accept the solution to help others store owners.
Looking for an expert or Have any queries ? Send query to the Inbox
Coffee Tip ? Pay to shopify.dev.34@gmail.com
From Less To Further !!!

View solution in original post

Replies 6 (6)

Sweet_Savior_3
Shopify Partner
1163 94 112

This is an accepted solution.

Hello @shopafterhour 

 

Welcome to Shopify Community.

 

Did you added in the correct file ? 

Because the code you gave is correct. If possible to provide the access to code editor to check do let me know.

 

Thanks

Don't forget to like and accept the solution to help others store owners.
Looking for an expert or Have any queries ? Send query to the Inbox
Coffee Tip ? Pay to shopify.dev.34@gmail.com
From Less To Further !!!
shopafterhour
Tourist
34 0 1

Do you know which files is the correct file?

 

I tried to put it in 

complementary-product-card.liquid and template--product.liquid but did not work.

the code is too long to put it here.

Maybe I added into the wrong line, how should I show you the codes?

 

Sweet_Savior_3
Shopify Partner
1163 94 112

As I said if possible to provide the access then please provide because the code needs to be checked.

Don't forget to like and accept the solution to help others store owners.
Looking for an expert or Have any queries ? Send query to the Inbox
Coffee Tip ? Pay to shopify.dev.34@gmail.com
From Less To Further !!!
shopafterhour
Tourist
34 0 1

I can provide you with the 

Collaborator Request Code: 2529

please send the request 

Thank you

shopafterhour
Tourist
34 0 1

You should be able to access the code now!

 

Sweet_Savior_3
Shopify Partner
1163 94 112
Yes i have. Can you send me the tags and the related text for each to the
inbox mentioned in below signature ?
Don't forget to like and accept the solution to help others store owners.
Looking for an expert or Have any queries ? Send query to the Inbox
Coffee Tip ? Pay to shopify.dev.34@gmail.com
From Less To Further !!!