I want to remove the product_options_wrapper block from the product view page according to the logedin user via frontend router controller.
I know that I can programmatically append a new block but I didn't find a remove function. :-(
Tried sth. like that
$this->getLayout()->unsetBlock('product_options_wrapper');
$this->getLayout()->getBlock('product.info')->remove('product_options_wrapper');
But nothing works.
Inorder to remove a block using its parent block use the code below
$this->getLayout()->getBlock('product.info')->unsetChild('product_options_wrapper');
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With