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.
As 2024 wraps up, the dropshipping landscape is already shifting towards 2025's trends....
By JasonH Nov 27, 2024Hey Community! It’s time to share some appreciation and celebrate what we have accomplis...
By JasonH Nov 14, 2024In today’s interview, we sat down with @BSS-Commerce to discuss practical strategies f...
By JasonH Nov 13, 2024