how create sort by discount in collection page.
which code define to set in sort by discount .
Topic summary
Request to add a “sort by discount” option on a Shopify collection page, asking specifically which code is needed to implement it. The goal implies sorting products by their discount amount (e.g., based on price vs. compare_at_price), but no technical details were provided.
One response suggests adding this as a filter via theme code or using an app, noting it can be customized if the user is a developer. However, it does not include steps, code snippets, or examples.
A follow-up participant says they added an option value for the sort but asks how to customize it and what the next steps are, indicating they need implementation guidance beyond creating the option.
No concrete solution, instructions, or code were shared. No images or attachments are involved. The thread remains unresolved and is seeking detailed, step-by-step implementation (theme code changes or app-based approach) for enabling discount-based sorting.
@vinayak21
Welcome to Shopify Community.
you have to Add this filter type using code or app, if you are already a developer then you can customized it, according to your need,
thank you
how to customize it. I’ve added the option-value. Now, what’s the next step