How can I delete an abbreviation from Product Titles?

Hi,

Can anyone tell me how I can remove “(ye)” from the end of my product titles? Here is a link to a preview of an example item - https://9bgifjettap75fud-55795810370.shopifypreview.com/products_preview?preview_key=6d10e4cc8652ba8c5ecce47899d8e272

The (ye) is just a price category indicator that we use in our point of sale software. We need to keep it there in our Point of Sale but don’t need it as part of Shopify.

Thanks!

@Dwe-K can you please share the code of your product page. It seems you are using “dawn” theme , hence the code file will be “main-product.liquid”.

Thanks

Hi @Dwe-K

You can do that from your Online Store > Themes > Edit code > open main-product.liquid file, find this line of code

# {{ product.title | escape }}

Replace it with this one and save your file

# {{ product.title | remove: "(ye)" | escape }}

That can be a bit more complex task than you expect.

For product page the original code is like

{{ product.title | escape }}

the code from @Dan-From-Ryviu will only remove (ye):

{{ product.title | remove: "(ye)" | escape }}

If there are other category indicators you want to remove, you may chain them like so:

{{ product.title | remove: "(ye)" | remove: "(aa)" | remove: "(bb)" | escape }}

Since you have products like “Edwin Lounge Chair - Charcoal (indoor / Outdoor)” it’d be too complex to create a universal code, but it’s possible.

You should update at least the following files:

sections/main-product.liquid (product page);

snippets/card-product.liquid (for collection and search results page);

note that in this file the original code is as below, so need to update accordingly:

{{ card_product.title | escape }}​

There are also files which control cart drawer/page, predictive search and pickup availability.
And then you may want to update notification e-mail templates.

And also – your checkout will show the original product title anyway.

1 Like

Thank you for your help! This worked for the product page but the product grid still shows. It’s fine though, I’m very happy with that. I appreciate your help.