Can anybody please tell me how I can add tooltip text for SKU in magento 2.2.5 admin panel product add/edit form.
-
Hey can you share your exact requirement as we are not able to understand what exactly your requirement is thanks.– Shubham KhandelwalCommented Oct 12, 2018 at 7:01
-
My requirement is adding tooltip text for sku in product add/edit form in magento admin panel.– vijaikarthikCommented 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.– Shubham KhandelwalCommented Oct 12, 2018 at 9:02
-
for already added attributes like sku what has to do?– vijaikarthikCommented 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.– Shubham KhandelwalCommented Oct 12, 2018 at 9:12
Add a comment
|
1 Answer
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'],
]
);
}
-
I tried your solution but didnt work for me .See my question magento.stackexchange.com/questions/321496/…– devZCommented Sep 3, 2020 at 10:44