Magento set simple products visible individually, but will take you to it's configurabe

Magento set simple products visible individually, but will take you to it's configurabe

September 20, 2026 · Illustrated author avatarBy Stefan Bogdanescu
Magento set simple products visible individually, but will take you to it's configurabe

Solving the Magento Visibility Dilemma: Displaying Simple Products Separately

As an experienced e-commerce developer, I often encounter situations where we need to display simple products individually in our Magento stores while still having them associated with their configurable parents. The standard approach is to set the simple product as “not visible” and the configurable one as “catalog, search”. However, sometimes you want to reverse this—displaying the simple products separately and hiding the configurables.

In this post, we’ll explore a practical solution for Magento 1.8.1 that allows us to achieve this seemingly counterintuitive setup. By following best practices in product visibility settings and applying some custom code, we can create an effective solution.

Understanding the Problem: Default Visibility Settings

Before diving into the solution, let’s first understand why the default visibility settings don’t work for our needs:

  1. Simple Products: By default, when you set a simple product to “catalog, search” visibility, it appears in both the catalog and search results but cannot be accessed directly via a URL.

  2. Configurable Products: When set to “not visible individually”, they are essentially hidden from customers and can only be accessed through their associated simple products.

The Solution: Reversing Visibility Settings

To achieve our desired outcome, we need to reverse these visibility settings:

  1. Set the visibility of your simple products to catalog, search.

  2. Set the visibility of your configurable product to not visible individually. This hides them from customers while keeping their relationship with the simple products intact.

Implementing Custom Code: Redirecting Simple Products

The key challenge lies in redirecting the simple products to their respective configurable parent when accessed directly. To accomplish this, we’ll use a custom observer that intercepts the product load event and redirects if necessary.

Here’s an example of how you can implement this using a custom module:

// app/code/local/YourCompany/RedirectSimpleToConfigurable/etc/config.xml

<config>
    <modules>
        <YourCompany_RedirectSimpleToConfigurable>
            <version>1.0</version>
        </YourCompany_RedirectSimpleToConfigurable>
    </modules>
    <global>
        <helpers>
            <redirectsimpletoconfigurable>
                <class>YourCompany_RedirectSimpleToConfigurable_Helper_Data</class>
            </redirectsimpletoconfigurable>
        </helpers>
        <events>
            <catalog_controller_product_view>
                <observers>
                    <redirect_simple_to_configurable>
                        <type>model</type>
                        <class>YourCompany_RedirectSimpleToConfigurable_Model_Observer</class>
                        <method>checkAndRedirect</method>
                    </redirect_simple_to_configurable>
                </observers>
            </catalog_controller_product_view>
        </events>
    </global>
</config>
// app/code/local/YourCompany/RedirectSimpleToConfigurable/Model/Observer.php

class YourCompany_RedirectSimpleToConfigurable_Model_Observer
{
    public function checkAndRedirect($observer)
    {
        $controllerAction = $observer->getEvent()->getControllerAction();
        $productId = (int) $controllerAction->getRequest()->getParam('id');
        $product = Mage::getModel('catalog/product')->load($productId);

        if ($product->isSimple() && $product->getVisibility() == Mage_Catalog_Model_Product_Visibility::VISIBILITY_BOTH) {
            $configurableProductId = $product->getConfigurableParentProductId();
            $configurableProduct = Mage::getModel('catalog/product')->load($configurableProductId);
            $configurableProduct->setData('_is_configurable', true);

            if ($configurableProduct->getVisibility() == Mage_Catalog_Model_Product_Visibility::VISIBILITY_NOT_VISIBLE) {
                Mage::app()->getResponse()
                    ->setRedirect(Mage::getUrl('catalog/product/view/id/' . $configurableProductId, false))
                    ->sendHeaders();
            }
        }
    }
}

This code creates an observer that checks if the loaded product is a simple product with “catalog, search” visibility. If it is, and its configurable parent has “not visible individually” visibility, a redirect to the configurable product’s URL is triggered.

Implementation Steps

To implement this solution:

  1. Create a new custom module (e.g., YourCompany_RedirectSimpleToConfigurable) following Magento 1 best practices.
  2. Add the observer code in the Observer.php file as shown above.
  3. Configure your products’ visibility settings according to our solution.

Conclusion: Achieving the Desired Product Visibility

By reversing the visibility settings of simple and configurable products and implementing the custom redirect logic, we can successfully display simple products individually while still keeping them linked to their configurable parents.

Remember that this approach requires careful consideration of your store’s needs and customer experience. It is best suited for scenarios where you need more flexibility in product presentation without compromising SEO or navigation.

For more detailed information on Magento 1 customizations, I recommend exploring the extensive resources available at Laravel Company. Their collection of tutorials and best practices is a great starting point for any developer looking to expand their Magento skills.

Magento 1 Catalog Configuration Customers

Our network