3

Can anybody please tell me how I can add tooltip text for SKU in magento 2.2.5 admin panel product add/edit form.

5
  • Hey can you share your exact requirement as we are not able to understand what exactly your requirement is thanks. Commented Oct 12, 2018 at 7:01
  • My requirement is adding tooltip text for sku in product add/edit form in magento admin panel. Commented Oct 12, 2018 at 8:55
  • so for adding tool tip text you can create product attribute and can assign value in it. once you created and assign text then you can easily fetch it on product page. Commented Oct 12, 2018 at 9:02
  • for already added attributes like sku what has to do? Commented Oct 12, 2018 at 9:03
  • Once you have created the attribute and assigned value to it you should run indexing so that newly created attribute will be save in backend. For showing this value on frontend you need to get it's value on product detail page once you have its value you can populate it on sku Div. Commented Oct 12, 2018 at 9:12

1 Answer 1

1

I found a solution by using modifiers in magento 2

  $skuPath = $this->arrayManager->findPath('sku', $meta, null, 'children');

    if ($skuPath) {
        $meta = $this->arrayManager->merge(
            $skuPath . static::META_CONFIG_PATH,
            $meta,
            [               
                    'dataScope' =>  'sku',  
                      'tooltip' =>['description'=>'Sku tooltip text'],


            ]
        );
    }
1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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