Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Configure.php
Go to the documentation of this file.
1 <?php
7 
17 {
23  protected function _prepareLayout()
24  {
25  // Set custom submit url route for form - to submit updated options to cart
26  $block = $this->getLayout()->getBlock('product.info');
27  if ($block) {
28  $block->setSubmitRouteData(
29  [
30  'route' => 'checkout/cart/updateItemOptions',
31  'params' => ['id' => $this->getRequest()->getParam('id')],
32  ]
33  );
34  }
35 
36  return parent::_prepareLayout();
37  }
38 }
$block
Definition: block.php:8