Shopify themes, liquid, logos, and UX
Hi all,
In a previous version of Dawn theme, I had edited the card-product.liquid file to include the collection name in the url of the product. So for example: mysite.com/collectionname/productname instead of just mysite.com/products/productname. This was working great for displaying my popup forms on only some products from collections, etc.
The code I had changed in card-product.liquid was line 108:
{{ card_product.url }}
To:
{{ card_product.url | within: collection }}
This worked beautifully to add in the collection name to the url of the product.
However, I've just upgraded to Dawn 10.0, made this same change to the file, but it doesn't work the same.
Any tips? Would the code need to be different?
Thanks in advance!
you need to add object in card render in collection file.
Then you can use that collection object. for example here.
Hope this helps.
Hey Community! As we jump into 2025, we want to give a big shout-out to all of you wh...
By JasonH Jan 7, 2025Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024