Truncate/shorten product titles code - Warehouse Theme

PDF
Visitor
2 0 2

Hi,

I'm trying to limit the number of characters displayed in my product titles on the collection pages on Warehouse theme.


I've tried to locate product-card-grid.liquid (in snippets or other folders) and searched for "truncate", {{ product.title }} or "{{ product.title | truncate:50 }}" and haven't found anything that looks like a reference to maximum character length.

Can you help me find a way to shorten the name displayed on the collection pages.

Thank you in advance!

Dragos

Replies 5 (5)

KetanKumar
Shopify Partner
36845 3636 11978

@PDF 

Sorry for facing this issue, it's my pleasure to help us.

Welcome to the Shopify community!
and Thanks for your Good question. 😊

Please share your site URL,
So I will check and provide a solution here.

also if are able to code try this 

{{ product.title | truncate: 5 }}
If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on bamaniyaketan.sky@gmail.com regarding any help
Shopify Partner | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing
PDF
Visitor
2 0 2

@KetanKumar, the issue is I'm not able to find the file and the code section where I can shorten the product title code.

Either 50 characters or 5 characters it doesn't matter at this point. The product titles are from 30 to 130 characters and I want to limit them to show only 50 characters on the collection and recently view.

If it helps the URL page is: https://store.eltek.ro/ 

Thank you.

KetanKumar
Shopify Partner
36845 3636 11978

@PDF 

It can be done by doing some code customization. please send me a personal message and we can discuss what you'd like

If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on bamaniyaketan.sky@gmail.com regarding any help
Shopify Partner | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing

wa3
Visitor
1 0 0

Had the same problem and found out this code is actually located in product-item.liquid.

<a href="{{ filtered_variant.url | default: product.url }}" class="product-item__title text--strong link">{{ product.title }}</a>

Hope it helps.

Josh017
Visitor
1 0 0

Hi have you found the solution? anyone can help me 
here is my website www.natikon.net