Changing Product Options Layout in Magento

Changing Product Options Layout in Magento

July 31, 2026 · Illustrated author avatarBy Stefan Bogdanescu
Changing Product Options Layout in Magento

Changing Product Options Layout in Magento

As an e-commerce developer, I often receive inquiries about customizing Magento’s product options layout. One common question is how to change the appearance of the configurable product attributes box.

In your case, you’ve created a configurable product with color options but noticed that the options are displayed inconsistently across different products on the demo site. You want your options to appear more compactly, like the “Zolof the Rock and Roll Destroyer Lol Cat T-Shirt” product page.

Understanding Magento’s Default Behavior

Magento uses a default template for displaying configurable product options (catalog/product/view/configurable.phtml). This template includes the options inside a <select> element by default. The layout is determined by the configurable block in your theme’s layout.xml.

If you want to change this behavior, you have two main approaches: customizing the existing template or creating a new one.

Approach 1: Customize the Existing Template

You can modify the catalog/product/view/configurable.phtml file in your theme directory (usually located at app/design/frontend/[package]/[theme]/template/catalog/product/view/).

To create a more compact layout, you could:

  • Use CSS to reduce the width of the <select> element.
  • Add custom JavaScript to handle option selection differently.

Here’s a simple example of reducing width using inline CSS:

<select id="attribute_93" name="super_attribute[93]" class="required-entry super-attribute-select">
  <option value="">Please Select</option>
    <!-- Your options will be dynamically generated here -->
</select>

You can add style="min-width: auto; max-width: 100px;" to the <select> element to limit its width.

Approach 2: Create a New Template

If you want more control over the layout, it’s better to create a new template file (my-configurable.phtml) and reference it in your theme’s layout.xml.

To do this:

  1. Copy the existing configurable.phtml file.
  2. Customize the new file according to your requirements.
  3. In your theme’s layout.xml (usually located at app/design/frontend/[package]/[theme]/layout/), add a reference to your new template:
<block type="catalog/product_view_config" name="product.info.options.configurable" as="options_config" template="catalog/product/view/my-configurable.phtml"/>

Conclusion

Changing the product options layout in Magento requires a combination of template customization and potentially some CSS or JavaScript tweaks.

It’s essential to work with a child theme so that your changes are preserved during updates. Remember, any direct modifications to core files will be overwritten by updates.

For more detailed guidance on theming in Magento, I recommend checking out our comprehensive guide: Magento Theming for Beginners.

If you’re looking for a more robust solution or have specific branding requirements, consider using a dedicated extension like Amasty Configurable Products Pro. It offers advanced customization options out of the box.

Either way, with some development knowledge and attention to theming best practices, you can achieve a unique and consistent product options layout for your Magento store.

Catalog Themes Configuration JavaScript

Our network