We sacrifice by not doing any other technology, so that you get the best of Magento.

We sacrifice by not doing any other technology, so that you get the best of Magento.

    If you want to change the main price with a custom price attribute. You can use the below method

    1. Create file di.xml on app/code/Magemonkeys/CustomPrice/etc/frontend

    <?xml version="1.0"?>
    <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
        <type name="MagentoCatalogModelProduct">
            <plugin name="change_product" type="MagemonkeysCustomPricePluginModelProduct" sortOrder="1" />
        </type>
    </config>

    2. Create file Product.php on app/code/Magemonkeys/CustomPrice/Plugin/Model

    <?php
    namespace MagemonkeysCustomPricePluginModel;
     
    class Product
    {
        public function afterGetPrice(MagentoCatalogModelProduct $subject, $result)
        {        
            $result = $subject->getCustomPrice(); // you can set custom attribute price
            return $result;
        }
    }

     

    Fill the below form if you need any Magento relate help/advise/consulting.

    With Only Agency that provides a 24/7 emergency support.

      Get a Free Quote