1

There is this code in Magento 2 in

Magento\Catalog\Controller\Adminhtml\Product\Save.php

if ($redirectBack === 'new') 
{            
   $resultRedirect->setPath('catalog/*/new'
                           ,['set' => $productAttributeSetId
                                ,'type' => $productTypeId]);

Can anyone tell me what does 'catalog/*/new' refers to? I have checked the controller folder and haven't found new.php file anywhere.

3

It means that the current part of the route will be used in that position. So if the current route is catalog/product/index then catalog/*/new will be catalog/product/new.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.