Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
wizard.phtml
Go to the documentation of this file.
1 <?php
7 // @codingStandardsIgnoreFile
8 
10 ?>
11 <?php
12 $productMatrix = $block->getProductMatrix();
13 $attributes = $block->getProductAttributes();
14 $currencySymbol = $block->getCurrencySymbol();
15 ?>
16 <div class="<?= /* @noEscape */ $block->getData('config/dataScope') ?>" data-role="step-wizard-dialog" data-bind="scope: '<?= /* @noEscape */ $block->getForm() ?>.<?= /* @noEscape */ $block->getModal() ?>'">
17  <!-- ko template: getTemplate() --><!-- /ko -->
18 </div>
19 <div class="<?= /* @noEscape */ $block->getData('config/dataScope') ?>" id="product-variations-matrix" data-role="product-variations-matrix">
20  <div data-bind="scope: 'configurableVariations'"></div>
21 </div>
22 <script type="text/x-magento-init">
23  {
24  "*": {
25  "Magento_Ui/js/core/app": {
26  "components": {
27  "<?= /* @noEscape */ $block->getData('config/form') ?>.<?= /* @noEscape */ $block->getModal() ?>": {
28  "component": "Magento_ConfigurableProduct/js/components/modal-configurable",
29  "options": {"type": "slide", "title": "<?= $block->escapeHtml(__('Create Product Configurations')) ?>"},
30  "formName": "<?= /* @noEscape */ $block->getForm() ?>",
31  "isTemplate": false,
32  "stepWizard": "<?= /* @noEscape */ $block->getData('config/nameStepWizard') ?>",
33  "children": {
34  "wizard": {
35  "url": "<?= /* @noEscape */ $block->getUrl($block->getData('config/urlWizard'), ['id' => $block->getProduct()->getId()]) ?>",
36  "component": "Magento_Ui/js/form/components/html"
37  }
38  }
39  },
40  "<?= /* @noEscape */ $block->getData('config/form') ?>.configurableVariations": {
41  "component": "Magento_ConfigurableProduct/js/variations/variations",
42  "provider": "<?= /* @noEscape */ $block->getProvider() ?>",
43  "dataScopeVariations": "variations",
44  "dataScopeAttributes": "data.attributes",
45  "dataScopeAttributeCodes": "data.attribute_codes",
46  "dataScopeAttributesData": "data.product.configurable_attributes_data",
47  "formName": "<?= /* @noEscape */ $block->getForm() ?>",
48  "attributeSetHandler": "<?= /* @noEscape */ $block->getForm() ?>.configurable_attribute_set_handler_modal",
49  "wizardModalButtonName": "<?= /* @noEscape */ $block->getForm() ?>.configurable.configurable_products_button_set.create_configurable_products_button",
50  "wizardModalButtonTitle": "<?= $block->escapeHtml(__('Edit Configurations')) ?>",
51  "productAttributes": <?= /* @noEscape */ $this->helper('Magento\Framework\Json\Helper\Data')->jsonEncode($attributes) ?>,
52  "productUrl": "<?= /* @noEscape */ $block->getUrl('catalog/product/edit', ['id' => '%id%']) ?>",
53  "variations": <?= /* @noEscape */ $this->helper('Magento\Framework\Json\Helper\Data')->jsonEncode($productMatrix) ?>,
54  "currencySymbol": "<?= /* @noEscape */ $currencySymbol ?>",
55  "attributeSetCreationUrl": "<?= /* @noEscape */ $block->getUrl('*/product_set/save') ?>"
56  }
57  }
58  }
59  }
60  }
61 </script>
62 <script>
63  require(['jquery', 'mage/apply/main'], function ($, main) {
64  main.apply();
65  $('.<?= /* @noEscape */ $block->getData('config/dataScope') ?>[data-role=step-wizard-dialog]').applyBindings();
66  $('.<?= /* @noEscape */ $block->getData('config/dataScope') ?>[data-role=product-variations-matrix]').applyBindings();
67  })
68 </script>
$attributes
Definition: wizard.phtml:13
$block
Definition: block.php:8
$currencySymbol
Definition: wizard.phtml:14
$productMatrix
Definition: wizard.phtml:12