Hello Magento Friends,

In today’s blog we will learn about how to send email when there is a change in product prices for your Magento 2 store.

Keeping admins informed about product price changes can improve price management and foster transparency within your team. Here’s a comprehensive guide on how to set up this feature.

Before that, learn How to Change Product Price with Plugin in Magento 2.

Steps to Send Email when Product Price Change in Magento 2:

Step 1: First, we need to create an “events.xml“ file inside our extension at the following path

app\code\Vendor\Extension\etc\adminhtml\events.xml

Then add the below-mentioned code

Step 2: After that, we need to create a “Saveshippingdata.php” file inside our extension at the following path

app\code\Vendor\Extension\Observer\Saveshippingdata.php

And add the code as given below

Step 3: After that, we need to create an “email_templates.xml” file inside our extension at the following path

app\code\Vendor\Extension\etc\adminhtml\email_templates.xml

And add the code as follows

Step 4: After that, we need to create a “price_change.html” file inside our extension at the following path

app\code\Vendor\Extension\view\frontend\email\price_change.html

Now add the below-mentioned code

Conclusion:

With these steps, you have set up a system in Magento 2 that sends email notifications to admins when a product price changes. This proactive approach helps maintain competitive pricing strategies and ensures that the admin is always informed of any significant changes.

If you have any questions or run into issues, feel free to leave a comment below or contact us for further assistance.

Happy Coding!

Click to rate this post!
[Total: 0 Average: 0]