How to sort dropdown options in Infinite Options bundle
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 custom JavaScript snippet to your store via the App Embed or App Block (depending on what you are using) in your Shopify theme editor. The script will automatically sort the dropdown options alphabetically when the bundle loads.
You can download the JavaScript snippet here.
Option 1: App Embed (recommended)
- In your Shopify Admin, go to Online Store > Themes
- Click Edit theme on your active theme
- In the theme editor, click App Embeds (the puzzle piece icon in the left sidebar)
- Locate the Simple Bundles app embed and open its settings
- Paste the JavaScript snippet into the custom code field
- Click Save
Option 2: App Block
- In your Shopify Admin, go to Online Store > Themes
- Click Edit theme on your active theme
- Navigate to the product page template where your bundle is displayed
- Add or locate the Simple Bundles App Block
- In the block settings, paste the JavaScript snippet into the custom code field
- Click Save
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.