Cost-based pricing in Magento
may help you . My way doing this would be to listen the
catalog_product_prepare_save event and write a function in the observer.php
which sets the price of the product. You can find an illustrative tutorial
on events and observer here.
Date : November 24 2020, 05:47 AM , By : Sanatbek Matlatipov