Guest User

Untitled

a guest
Dec 11th, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.73 KB | None | 0 0
  1. protected function _prepareLayout() {
  2. $childBlock = $this->getLayout()->createBlock('MagentoCatalogBlockProductViewOptionsTypeDefaultType', 'product.info.options.default');
  3. $childBlock->setTemplate('Magento_Catalog::product/view/options/type/default.phtml');
  4. $this->addChild('default', $childBlock);
  5. $childBlock = $this->getLayout()->createBlock('MagentoCatalogBlockProductViewOptionsTypeText', 'product.info.options.text');
  6. $childBlock->setTemplate('Magento_Catalog::product/view/options/type/text.phtml');
  7. $this->addChild('text', $childBlock);
  8. $childBlock = $this->getLayout()->createBlock('MagentoCatalogBlockProductViewOptionsTypeFile', 'product.info.options.file');
  9. $childBlock->setTemplate('Magento_Catalog::product/view/options/type/file.phtml');
  10. $this->addChild('file', $childBlock);
  11. $childBlock = $this->getLayout()->createBlock('MagentoBundleBlockCatalogProductViewTypeBundleOptionSelect', 'product.info.bundle.options.select');
  12. $childBlock->setTemplate('Magento_Bundle::catalog/product/view/options/type/bundle/option/select.phtml');
  13. $this->addChild('select', $childBlock);
  14. $childBlock = $this->getLayout()->createBlock('MagentoCatalogBlockProductViewOptionsTypeDate', 'product.info.options.date');
  15. $childBlock->setTemplate('Magento_Catalog::product/view/options/type/date.phtml');
  16. $this->addChild('date', $childBlock);
  17. $childBlock = $this->getLayout()->createBlock('MagentoBundleBlockCatalogProductViewTypeBundleOptionMulti', 'product.info.bundle.options.,ulti');
  18. $childBlock->setTemplate('Magento_Bundle::catalog/product/view/options/type/bundle/option/multi.phtml');
  19. $this->addChild('multi', $childBlock);
  20. $childBlock = $this->getLayout()->createBlock('MagentoBundleBlockCatalogProductViewTypeBundleOptionRadio', 'product.info.bundle.options.radio');
  21. $childBlock->setTemplate('Magento_Bundle::catalog/product/view/options/type/bundle/option/radio.phtml');
  22. $this->addChild('radio', $childBlock);
  23. $childBlock = $this->getLayout()->createBlock('MagentoBundleBlockCatalogProductViewTypeBundleOptionCheckbox', 'product.info.bundle.options.checkbox');
  24. $childBlock->setTemplate('Magento_Bundle::catalog/product/view/options/type/bundle/option/checkbox.phtml');
  25. $this->addChild('checkbox', $childBlock);
  26. return parent::_prepareLayout();
  27. }
  28.  
  29. <referenceContainer name="content">
  30. <container name="Example.personalisation.main" htmlTag="div" htmlClass="personalisation" after="-">
  31. <block class="ExamplePersonalisationBlockForm" name="Example.personalisation.form" template="Example_Personalisation::form.phtml">
  32. <arguments>
  33. <argument name="products" xsi:type="string">bundle-test,bundle-test2</argument>
  34. </arguments>
  35. <container name="product.info.form.content" as="product_info_form_content">
  36. <block class="MagentoCatalogBlockProductView" name="product.info.addtocart" as="addtocart" template="Magento_Catalog::product/view/addtocart.phtml"/>
  37. </container>
  38. <block class="MagentoFrameworkViewElementTemplate" name="product.info.form.options" as="options_container">
  39. <block class="MagentoCatalogBlockProductView" name="product.info.options.wrapper" as="product_options_wrapper" template="Magento_Catalog::product/view/options/wrapper.phtml">
  40. <block class="MagentoCatalogBlockProductViewOptions" name="product.info.options" as="product_options" template="Magento_Catalog::product/view/options.phtml">
  41. <block class="MagentoCatalogBlockProductViewOptionsTypeDefaultType" name="product.info.options.default" as="default" template="Magento_Catalog::product/view/options/type/default.phtml"/>
  42. <block class="MagentoCatalogBlockProductViewOptionsTypeText" name="product.info.options.text" as="text" template="Magento_Catalog::product/view/options/type/text.phtml"/>
  43. <block class="MagentoCatalogBlockProductViewOptionsTypeFile" name="product.info.options.file" as="file" template="Magento_Catalog::product/view/options/type/file.phtml"/>
  44. <block class="MagentoCatalogBlockProductViewOptionsTypeSelect" name="product.info.options.select" as="select" template="Magento_Catalog::product/view/options/type/select.phtml"/>
  45. <block class="MagentoCatalogBlockProductViewOptionsTypeDate" name="product.info.options.date" as="date" template="Magento_Catalog::product/view/options/type/date.phtml"/>
  46. <block class="MagentoBundleBlockCatalogProductViewTypeBundleOptionSelect" name="product.info.bundle.options.select" as="select"/>
  47. <block class="MagentoBundleBlockCatalogProductViewTypeBundleOptionMulti" name="product.info.bundle.options.multi" as="multi"/>
  48. <block class="MagentoBundleBlockCatalogProductViewTypeBundleOptionRadio" name="product.info.bundle.options.radio" as="radio"/>
  49. <block class="MagentoBundleBlockCatalogProductViewTypeBundleOptionCheckbox" name="product.info.bundle.options.checkbox" as="checkbox"/>
  50. </block>
  51. <block class="MagentoFrameworkViewElementHtmlCalendar" name="html_calendar" as="html_calendar" template="Magento_Theme::js/calendar.phtml"/>
  52. </block>
  53. <block class="MagentoCatalogBlockProductView" name="product.info.options.wrapper.bottom" as="product_options_wrapper_bottom" template="Magento_Catalog::product/view/options/wrapper/bottom.phtml">
  54. <block class="MagentoCatalogBlockProductView" name="product.info.addtocart.additional" as="product.info.addtocart" template="Magento_Catalog::product/view/addtocart.phtml"/>
  55. </block>
  56. </block>
  57. </block>
  58. </container>
  59. </referenceContainer>
Add Comment
Please, Sign In to add comment