Product not within the collection URL

Product not within the collection URL

Florence
Excursionist
32 1 1

Hi,

 

I dont understand why my product URL is not part of my collection URL.

This is the collection showing all my products: https://florence-streif.com/collections/alle-abstrakte-kunstwerke

and then when I click into a product it goes to: https://florence-streif.com/products/pouring-nature 

instead of: https://florence-streif.com/collections/alle-abstrakte-kunstwerke/products/pouring-nature

 

Can somebody help me with that?

Thanks a lot!

Florence

Replies 5 (5)

Dan-From-Ryviu
Shopify Partner
10768 2128 2249

Hi @Florence 

You can add the collection to product URL by following the steps:

  • Go to your store admin > Sale channels > open Online store
  • In Themes > click "..." in your current theme > Edit code 
  • Open card-product.liquid file, find this line of code href="{{ card_product.url }} around line 155
  • Replace it with this code href="{{ card_product.url | within: collection }}
  • Save your file.

Screenshot 2024-07-31 at 10.05.44.png

- Solved it? Hit Like and Accept solution! ❤️Buy Me Coffee❤️
- Reton: Loyalty & Rewards - Earn points through tasks, redeem for discounts, and enjoy exclusive VIP rewards!
- Ryviu - Reviews & QA app: Collect product reviews, import reviews from AliExpress, Amazon, Etsy, Walmart, Shopee, Dhgate and CSV.
- Lookfy Gallery: Lookbook Image: Easy and fast to create Photo Gallery, Lookbook, Shop The Look.
- Reelfy‑Shoppable Videos+Reels: Create shoppable videos to engage customers and drive more sales.
- Enjoy 1 month of Shopify for $1. Sign up now.

Florence
Excursionist
32 1 1

Hi @Dan-From-Ryviu 

 

thanks, it worked for the navigation going from the collection page to a product, but it does not work when I click directly on a product from the entry page - and it still is under the path products and not collections:

Florence_0-1722424361080.png

when I click on the first, I land on: https://florence-streif.com/products/pouring-nature 

 

why do these URLs even exists? Do I need to redirect all of them now?

 

Thanks

Florence

Florence
Excursionist
32 1 1

@Dan-From-Ryviu would be great if you can help me. Thanks!

Dan-From-Ryviu
Shopify Partner
10768 2128 2249

Hi @Florence 

It can be added to the collection URL if you click on the product on the collection page only. 

 

- Solved it? Hit Like and Accept solution! ❤️Buy Me Coffee❤️
- Reton: Loyalty & Rewards - Earn points through tasks, redeem for discounts, and enjoy exclusive VIP rewards!
- Ryviu - Reviews & QA app: Collect product reviews, import reviews from AliExpress, Amazon, Etsy, Walmart, Shopee, Dhgate and CSV.
- Lookfy Gallery: Lookbook Image: Easy and fast to create Photo Gallery, Lookbook, Shop The Look.
- Reelfy‑Shoppable Videos+Reels: Create shoppable videos to engage customers and drive more sales.
- Enjoy 1 month of Shopify for $1. Sign up now.

Florence
Excursionist
32 1 1

@Dan-From-Ryviu but then I have 2 URLs for the same product. That's not good. Is there a different solution?

 

https://florence-streif.com/products/pouring-nature 

https://florence-streif.com/collections/alle-abstrakten-kunstwerke/products/pouring-nature