Magento Custom Development Development is a must for any business to fulfill their needs and save time and efforts by serving excellent shopping experience to your shoppers. Whether it is frontend or backend, Magento supports seamless customization & integrations to fulfill every business needs.
Several times, it happens that the store owner is willing to set a fixed product price even if multiple options/add-ons are selected by the customer from the frontend for all or some specific products. At that time we need to manually code to override all store product price with your desired custom price instead of manually editing all store products.
Here is a small piece of code that allows you to do the same.
First create file “events.xml” file at below Path.
app\code\Vendor\Extension\etc\frontend\events.xml

Now we need one more file named “Customprice.php” that override our price using below code.
app\code\Vendor\Extension\Observer\Customprice.php

That’s it! You are free to play and manipulate this according to your need for setting a custom price for one or more products by adding conditions.
Let us know if you are facing an issue while implementing using this code by commenting below.
Happy Coding!

Custom Price

 

[Total: 16   Average: 4.8/5]