1

Actually I am creation a custom product view page fore understanding the rendering of product view

I have created controller like this

namespace Tasks\BulkAdd\Controller\Index;
class Vivek extends Action{
    ...
    public function execute()
    {
        $sku = $this->getRequest()->getParam('sku');
        $product = $this->repository->get($sku);
        $this->registry->register('product', $product);
        $this->registry->register('current_product', $product);

        $result = $this->pageFactory->create();
        return $result;

    }
}

In my layout file "bulkadd_index_vivek.xml" I have copied all the content of "catalog_product_view.xml"

My link is show like "http://10.16.16.188/magento/wholesaler/bulkadd/index/vivek/sku/24-MB01-1"

For simple products, It is working fine and showing all customisation options of product. Take a look bellow

enter image description here

but for Configurable products, It is not making configuration. See the output

enter image description here

I found that two Blocks are taking product from registry with key "product" and "current_product". That's why I set them in my controller.

Please tell what else i need to set from my controller to get product Configurations?

Thank You

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.