is there a way to add custom button above each input in SEO section in product edit ?
I tried lot of variants like :
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd"> <body> <referenceBlock name="product_form"> <block class="Magento\Backend\Block\Widget\Button" name="custom_button" template="Stehlik_ChatGPT::button.phtml" before="meta_description"/> </referenceBlock> </body> </page>
But nothing seems to work.
Can somebody help me with this please? I'm new with Magento 2.
To remove the custom button code from the SEO section of the product edit page in Magento 2, locate the layout XML file where you added the button, open the file, and remove the block of code associated with the button. After saving the XML file, clear the Magento cache, and the custom button should no longer appear in the SEO section on the product edit page.
But my problem is, that I can't add buttons there. In category edit, I was able to add custom buttons in SEO section, but I'm not able to add these buttons in SEO section in product edit.
It looks like you've made a good start with your XML layout attempt. However, to make this work, you might want to consider creating a custom module for your Magento installation. This way, you can neatly organize your changes and ensure they won't get overridden during updates.
Inside your custom module, you can create a layout XML file to extend the product edit page. This is where you'd specify the block class and template for your custom button. It's a bit of coding, but don't worry; once you get the hang of Magento's structure, it'll become more intuitive. I'd recommend checking out Magento 2's module development documentation and forums. There are often code examples and discussions that can guide you through this process step by step. If you're thinking about boosting your site's SEO beyond this customization, you might want to give a free SEO crawler a shot. These tools can provide you with a detailed technical audit of your site, helping you identify areas for improvement.