How to remove choose an option in configurable product in magento?

How to remove choose an option in configurable product in magento?

October 4, 2026 · Illustrated author avatarBy Stefan Bogdanescu
How to remove choose an option in configurable product in magento?

Hiding the “Choose an Option” Default in Magento Configurable Products

You’ve found yourself in a common situation: building a Magento project where you want to hide or modify the default option in your configurable products. In this blog post, we’ll guide you through the process of making these changes effectively.

Understanding the Problem

By default, when you create a configurable product in Magento 1.8, it displays all options with the “Choose an Option” selection as the default. This can lead to confusion for customers and doesn’t provide a seamless shopping experience. To fix this issue, you have two main goals:

  • Hide the “Choose an Option” option from the frontend.
  • Set a specific option as the default.

The Challenge: A Misleading Script

You’ve come across a script that suggests how to achieve this. However, as you’ve experienced, it might not work as expected out of the box. This often happens due to conflicts with your theme or other customizations in your project.

Step 1: Understanding Magento’s Product Configuration

Before we dive into code, let’s understand how Magento manages configurable products:

  • A configurable product is a composite of simple products.
  • Each simple product represents an option (like size, color, etc.).
  • The configurable product displays these options on the frontend.

Step 2: Modifying the Configurable Product View

To hide the “Choose an Option” text and set a default option, you need to modify the way Magento renders the configurable product view. This involves changing the layout files and adding some custom JavaScript.

Step 3: Overriding the Layout XML

In your theme’s local.xml file (usually found at app/design/frontend/package/theme/layout/local.xml), add or update the following node:

<layout version="1.0">
    <catalog_product_view>
        <reference name="product.info.options.wrapper">
            <action method="setTemplate"><template>your-theme/template/catalog/product/view/options/wrapper.phtml</template></action>
        </reference>
    </catalog_product_view>
</layout>

Replace your-theme with the name of your theme.

Step 4: Creating the Custom Wrapper Template

Create a new file at app/design/frontend/package/theme/template/catalog/product/view/options/wrapper.phtml. This will override the default Magento template.

In this file, you need to hide the “Choose an Option” text and set one option as selected by default. Here’s how you can do it:

<?php if($this->getOptions()): ?>
    <div class="options-wrapper">
        <?php foreach ($this->getOptions() as $_option): ?>
            <?php echo $this->callJsObject('optionConfig', 'select', 'product_'.$productId.'_super_attribute_'.$_option['attribute_id'], '<?php echo $_option['value_index'] ?>')?>
            <div class="option-label"><?php echo $_option['label'] ?></div>
        <?php endforeach; ?>
    </div>
    <script type="text/javascript">
        // Set default option
        var selectedOption = '7';  // Replace with the desired option ID
        document.getElementById('product_<?php echo $this->getProduct()->getId() ?>_super_attribute_<?php echo $_attributeId ?>').selectedIndex = selectedOption;
    </script>
<?php endif; ?>

In this script:

  • The first part iterates through the options and calls a JavaScript function to select each option.
  • The second part is the custom JavaScript code that sets one specific option as selected by default.

Step 5: Clearing Cache

After making these changes, don’t forget to clear your Magento cache from System > Cache Management. This ensures that the new layout and template are applied correctly on the frontend.

Conclusion

Hiding or modifying the “Choose an Option” text in a Magento configurable product requires a combination of layout modification and custom JavaScript. By following this guide, you should be able to achieve your goal and create a more user-friendly experience for your customers.

Remember, when working with Magento’s layout files, it’s always best to work within your theme rather than directly modifying the core files. This approach keeps your store update-safe and makes it easier to maintain your code in the long run.

For further reading on customizing Magento layouts, you can check out this comprehensive guide on our blog: Mastering Magento Layouts.

Happy coding!

Magento 1 Catalog Themes Configuration

Our network