0

I want to move 'Discogs Listing' tab after the content tab. I dont know how to do it. drag and drop from attribute set move my tab after the 'Product Reviews' but i want after the 'content' tab

enter image description here

Any help would be appreciate. thank you

0

Through this method \Magento\Eav\Setup\EavSetup::addAttributeGroup it is understood that the groups have a sort order. Below is the table that contains them

enter image description here

Through the repository you can modify its sortOrder: \Magento\Eav\Model\Attribute\GroupRepository

Cheers

| improve this answer | |
0

This is how I achieved it using modifier

in your

app\code\vendor\module\etc\adminhtml\di.xml

    <?xml version="1.0"?>
    <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
      <virtualType name="Magento\Catalog\Ui\DataProvider\Product\Form\Modifier\Pool">
        <arguments>
            <argument name="modifiers" xsi:type="array">
                <item name="sap_product" xsi:type="array">
                    <item name="class" xsi:type="string">vendor\module\Ui\DataProvider\Product\Form\Modifier\Group</item>
                    <item name="sortOrder" xsi:type="number">1000</item>
                </item>
            </argument>
        </arguments>
    </virtualType>
</config>

and

app\code\vendor\module\Ui\DataProvider\Product\Form\Modifier\Group.php

<?php
namespace vendor\module\Ui\DataProvider\Product\Form\Modifier;

use Magento\Catalog\Ui\DataProvider\Product\Form\Modifier\AbstractModifier;
use Magento\Framework\Stdlib\ArrayManager;

class Group extends AbstractModifier
{
    public function __construct(ArrayManager $arrayManager)
    {
        $this->arrayManager = $arrayManager;
    }

    public function modifyData(array $data)
    {
        return $data;
    }
    public function modifyMeta(array $meta)
    {
        

        $meta['discogs-listing']['arguments']['data']['config']['sortOrder'] = 20;
        return $meta;
    }
}
| improve this answer | |

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.