Hi there,
Price alignment, Why is the price position not aligned in the same column of products?
How and where should I add the code?
A user reported misaligned product prices in the Dawn theme caused by varying product title lengths.
Solution Provided:
{{ product_card_product.title | escape }} in the product-card.liquid file{{ product_card_product.title | escape | truncate: 35 }}Outcome:
The original poster confirmed the truncate method successfully resolved the alignment issue.
Open Question:
Another user asked about alternative solutions that don’t use the truncate method. A responder indicated other approaches exist but requested the store URL to provide specific guidance. This aspect remains unresolved in the thread.
Hi there,
Price alignment, Why is the price position not aligned in the same column of products?
How and where should I add the code?
Limit characters of your product title by finding this code below in product-card.liquid file of your theme.
{{ product_card_product.title | escape }}
Replace it with this code
{{ product_card_product.title | escape | truncate: 35 }}
You can change value 35 in the code on your own to make it fit with your theme.
@Edison18831 Can you please send me store url?
Thank you very much! I used this code, and it worked.
Is there another way to achieve this without using truncate as a method?
Yes, it has. Could you share your store link so I can check?