Pricing is simple but it will make or break your business in many ways. Setting up high price leads to cart abandon and setting up law may result in you in loss of money. That’s why Pricing strategies are a mix of art and science. Assigning an Optimal price to a product each product, it’s important that can both improve your profits and increase store customer satisfaction should be increased sequentially.

Recently, a client came to us with a requirement of increasing all store product price by 15% without changing each product price individually from store backend. After thinking for a while, we pop out with a plan to develop a custom extension and increase store product price by overriding actual price of a product. Follow these 3 easy steps and you are done.

First Create ‘Module.xml’ file at below location using following code. It will help to override our custom layout file.
app\code\Vendor\Extension\etc\module.xml

Now it’s time to create our own custom layout at following path using this code.
app\code\Vendor\Extension\view\base\layout\catalog_product_prices.xml

Lastly, we have to create one more file ‘default.phtml’ with our logic of overriding default price.
app\code\Vendor\Extension\view\base\templates\catalog\product\price\amount\default.phtml

You can change $finalprice equation as per your requirement of increasing or decreasing price. Also, you can play & manipulate with these codes according to your needs.

Lastly, hit that stars if you love reading our blogs and comment down below if you face any issue while using this code.
Happy Overriding!

Click to rate this post!
[Total: 15 Average: 4.1]