main.js
file. It has to be placed into a <plugin root>/src/Resources/app/administration/src
directory in order to be automatically found by Shopware 6.main.js
file then needs to override the Vue component using the override
method of our ComponentFactory
.sw-product-settings-form
component is overridden, which reflects the settings form on the product detail page. As mentioned above, the second parameter has to be an object, which includes the actual template extension.sw-product-settings-form.html.twig
in the following directory: <plugin root>/src/Resources/app/administration/src/extension/sw-product-settings-form
sw_product_settings_form_content
is overridden here. Make sure to have a look at the Twig documentation about the template inheritance, to understand how blocks in Twig work.main.js
file in your plugin. Its contents get minified into a new file named after your plugin and will be moved to the public
directory of Shopware 6 root directory. Given this plugin would be named "AdministrationNewField", the minified javascript code for this example would be located under <plugin root>/src/Resources/public/administration/js/administration-new-field.js
, once you run the command following command in your shopware root directory:<shopware root>/public/bundles/administration/newfield/administration/js/administration-new-field.js
.