Skip to content

simple-product

Auto Added by WPeMatico

Select configurable product option, Magento 2

I have a module that redirects the url of a simple product to the configurable product. For this I have this: events.xml <?xml version=”1.0″?> <config xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xsi:noNamespaceSchemaLocation=”urn:magento:framework:ObjectManager/etc/config.xsd”> <event name=”controller_action_predispatch_catalog_product_view”> <observer name=”vendor_redirectsimpletoconfigurable_products_observer_predispatch” instance=”VendorRedirectSimpleToConfigurableObserverPredispatch”/> </event> </config> Predispatch.php <?php declare(strict_types=1); namespace VendorRedirectSimpleToConfigurableObserver; use… Read More »Select configurable product option, Magento 2