How to sort dropdown options in Infinite Options bundle
Update (October 2026): The Custom JavaScript field in the Simple Bundles app block and app embed is deprecated. Add scripts with a Custom Liquid block or section in your theme instead, as shown in the steps below. Some screenshots may still show the old Custom JavaScript field while we update them.
If you already have code in the Custom JavaScript field, it keeps working for now, but we recommend moving it to a Custom Liquid block. Copy your code somewhere safe first: once you clear the field and save, the field disappears from your settings.
How dropdown options in the Infinite Options bundle are displayed
When using the Infinite Options bundle with the Quickly Build method, dropdown options are displayed in the order they are listed in your product settings; they are not sorted alphabetically by default. If you'd like your options to appear in alphabetical order, you can add a small JavaScript snippet to your store.
Why your options may not appear alphabetically
The Quickly Build method pulls options directly from your product variants and displays them as-is. Since no automatic sorting is applied, options will appear in whatever order they were created or listed in Shopify.
How to sort the dropdown options alphabetically
You can resolve this by adding a small JavaScript snippet to your product page with a Custom Liquid block in the Shopify theme editor. The script will automatically sort the dropdown options alphabetically when the bundle loads.
You can download the JavaScript snippet here.
How to add the script
- In your Shopify Admin, go to Online Store > Themes
- Click Customize on your active theme
- Use the template selector at the top to open the product template your bundle uses
- In the left sidebar, inside the product information section, click Add block and choose Custom Liquid. If your theme doesn't offer a Custom Liquid block there, click Add section and choose Custom Liquid instead.
- In the Custom Liquid box, type
<script>on the first line, paste the JavaScript snippet below it, then type</script>on the last line - Click Save
<script> // paste the contents of sb-io-sort.js here </script>
The block doesn't display anything on the page, so you can leave it anywhere in the section.
What to expect after adding the script
Once the script is in place, the dropdown options in your Infinite Options bundle will be sorted alphabetically on the storefront. No changes are made to your actual product data in Shopify, the sorting happens on the frontend only.
Sample Implementation:
If you run into any issues after adding the script or have questions along the way, feel free to reach out to our support team at hello@simplebundles.io.