2

Lets navigate to:

Adminview -> Product -> Cataloque -> Edit Any Product

and we will get this view:

How can I remove "Produktbewertungen"?

It says the file is:

templates/form/collapsible.xhtml

and the block is

Magento\Ui\Component\Form

Many thanks!:-)

  • do you want to remove the review tab just from the edit page or disable the reviews module? – Adrian Z. Mar 15 '18 at 9:23
  • I want to remove the "Produktbewertungen" Tab from the picture above. – k33n Mar 15 '18 at 9:25
1

You will need to remove the tab from the layout. Add inside

app/design/adminhtml/Theme_Namespace/Theme_Name/Magento_Review/layout/catalog_product_new.xml

inside the body tag something like:

<referenceBlock name="product_tabs">
     <referenceBlock name="product.reviews" remove="true" />
</referenceBlock>

You can see more information about the tab in:

/vendor/magento/module-review/view/adminhtml/layout/catalog_product_new.xml

If you want to disable the module you can run:

php bin/magento module:disable --clear-static-content Magento_Review
php bin/magento cache:flush
  • disabling the module did the trick. Thanks!:-) – k33n Mar 15 '18 at 10:45
3

To customize the product creation form, take the following steps:

In your custom module, add an empty product_form.xml in the <your_module_dir>/view/adminhtml/ui_component/ directory.

Your product_form.xml is merged with the same files from the other modules. So there is no need to copy their content, you only need to define changes. Even if you want to customize the existing entities, you only have to mention those options, the values of which are customized.

To customize an existing entity, declare only those options, the values of which are customized, do not copy its entire configuration.

To delete an existing field, or field set, in your product_form.xml use the following construction:

...
    <fieldset name="fieldset_name">
        <argument name="data" xsi:type="array">
            <item name="disabled" xsi:type="boolean">true</item>
        </argument>
    </fieldset>
...

For reference, view the product form configuration files of the Magento modules:

  • <Magento_Catalog_module_dir>/view/adminhtml/ui_component/product_form.xml
  • <Magento_CatalogInventory_module_dir>/view/adminhtml/ui_component/product_form.xml

  • <Magento_ConfigurableProduct_module_dir>view/adminhtml/ui_component/product_form.xml

  • this code works to remove review block but not working to remove samples from the downloadable product. – Knight017 Oct 1 '18 at 12:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.