74 $this->_coreRegistry = $coreRegistry;
75 $this->_catalogProduct = $catalogProduct;
78 parent::__construct($context);
88 $resultLayout = $this->resultLayoutFactory->create();
89 $resultLayout->addHandle(
'CATALOG_PRODUCT_COMPOSITE_UPDATE_RESULT');
102 $this->_coreRegistry->register(
'composite_update_result', $updateResult);
118 $resultLayout = $this->resultLayoutFactory->create();
120 $resultLayout->addHandle(
'CATALOG_PRODUCT_COMPOSITE_CONFIGURE')
121 ->addHandle(
'catalog_product_view_type_' . $productType);
123 $resultLayout->addHandle(
'CATALOG_PRODUCT_COMPOSITE_CONFIGURE_ERROR');
125 return $resultLayout;
141 if (!$configureResult->getOk()) {
142 throw new \Magento\Framework\Exception\LocalizedException(
__($configureResult->getMessage()));
152 $this->_coreRegistry->register(
'current_product',
$product);
153 $this->_coreRegistry->register(
'product',
$product);
156 $customerId = (int)$configureResult->getCurrentCustomerId();
157 $this->_coreRegistry->register(RegistryConstants::CURRENT_CUSTOMER_ID,
$customerId);
166 $productType =
$product->getTypeId();
170 $this->_coreRegistry->register(
'composite_configure_result_error_message', $e->getMessage());
__construct(Context $context, StoreManagerInterface $storeManager, Product $catalogProduct, Registry $coreRegistry, LayoutFactory $resultLayoutFactory, ProductRepositoryInterface $productRepository)
renderConfigureResult(\Magento\Framework\DataObject $configureResult)
_initUpdateResultLayout()
_initConfigureResultLayout($isOk, $productType)
foreach($product->getExtensionAttributes() ->getBundleProductOptions() as $option) $buyRequest
renderUpdateResult(\Magento\Framework\DataObject $updateResult)