Question

I have created a module. All working fine. Just want to extend one file but can't success.

I added extra field at admin tier price using this file.

\Magento\Catalog\Ui\DataProvider\Product\Form\Modifier\AdvancedPricing.php

function name: getTierPriceStructure

I want to extend this file in my module.

I tried this code but not shown extended file code.

path:WebMax\TirePriceAttrib\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="advanced-pricing" xsi:type="array">
                <item name="class" xsi:type="string">WebMax\TirePriceAttrib\Ui\DataProvider\Product\Form\Modifier\AdvancedPricing</item>
                <item name="sortOrder" xsi:type="number">90</item>
            </item>
        </argument>
    </arguments>
</virtualType>  

Was it helpful?

Solution

We can not extend only private function .

if we want to extend private function we have to extend public function which call that private function.

so after calling both function in file i got success in extend.

other than this code is right and working fine.

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top