Envy theme need to add text next to price by tags

Topic summary

Adding conditional text next to the price on Envy theme collection pages based on Shopify product tags (e.g., show “Dozen” for products tagged Dozen, “pcs” for products tagged pcs). The poster’s Liquid snippet using product.tags worked in principle but didn’t affect the collection price when placed in complementary-product-card.liquid and template–product.liquid; a CSS :after rule successfully added a static “BOX” label to all items but doesn’t support per-tag logic.

A responder says the Liquid approach is correct but likely in the wrong file/location and requests code editor access to verify implementation. The poster asks which file is correct, then provides collaborator access (Request Code: 2529) and confirms access has been granted.

The collaborator confirms access and asks for the list of tags and the corresponding label text via inbox to proceed.

Assets: a screenshot illustrating the desired label placement after price and a live collection page link were provided. Status: ongoing; awaiting tag-to-text mapping and code review.

Summarized with AI on December 30. AI used: gpt-5.

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.

{%- if product.tags contains 'Dozen' -%} Dozen {% endif %}

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

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

1 Like

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?

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

I can provide you with the

Collaborator Request Code: 2529

please send the request

Thank you

You should be able to access the code now!

Yes i have. Can you send me the tags and the related text for each to the
inbox mentioned in below signature ?