Limited collection constrains based on collection

Limited collection constrains based on collection

ProgramFalcon
Visitor
2 0 0

Hello,

 

in my website the constrains works well but it isn't suitable for my business module.

 

for example if i go to all plain fabric through this link:

https://vellato.com/collections/plain-fabric

then i click on red square from right. the website will direct to this link:

https://vellato.com/collections/plain-fabric?constraint=red

and this is very nice. but in case i click on black square again then then website will redirect to this link:

https://vellato.com/collections/plain-fabric?constraint=red+black

and that is as shopify point of view correct. but logically in my business is wrong. because there are no any solid color fabric that is having two colors at the same time... so i want the shopify to redirect to this link:

https://vellato.com/collections/plain-fabric?constraint=black

 

in other way if the visitor tried to click on two constrains from the same group then the newest click should override the old constrain. while keeping the constrain members from other group.

 

any idea? where to code? and if you can help then i would be appreciated. 

Thanks!

 

Replies 2 (2)

ProgramFalcon
Visitor
2 0 0

up...

LitCommerce
Astronaut
2860 684 748

Hi @ProgramFalcon,

This is the correct code and works according to shopify's old filter. You can fix it by upgrading to shopify 2.0 filter.

Refer https://dawn-theme-default.myshopify.com/ ( Dawn theme )

This is going to be a complex requirement with lots of code changes, so if you want to upgrade it, you'll need to hire an expert for it. Or you can refer to the code: https://shopify.dev/themes/navigation-search/filtering

Hope it helps!

LitCommerce - The Most Simple & Affordable Multi-channel Selling Tool.
Effortlessly sell on biggest marketplaces like Amazon, Etsy, eBay, Facebook etc with bulk listing tool, real-time sync & smart order management. Use LitCommerce free for 1-year now!