Jump to content

When I Change My Order Status To Cancel A New Email Must Be Sent To Vendor's And Admin.


Recommended Posts

Hi Guys,

 

I need a little  customization in my prestashop website, I am using prestashop version 1.6.0.14,

 

I am using Agile Multiple Seller Module , One Page Checkout Module, and PrestaSMS module.

 

I want to send a email to customer,vendor and admin when the order-status is changed to Cancelled by the admin.

Currently prestashop sends a mail to customer when an order is cancelled. I want to implement same notification system to admin and vendors.

 

Note: I have multiple vendor's who sell on on my store, so associated vendor should get email when they are product is cancelled.

 

Anyone any idea how to go about it.

 

Thank You.

 

 

Link to comment
Share on other sites

I think it's near to impossible to treat this in the forum, being such a specific customization. If you are a developer, the only suggestion I can make is to try to hook something to OrderStatusUpdate, check the status, if it's cancelled, use the AgileSeller helper class to get the order's seller, and send the email out.

Link to comment
Share on other sites

  • 3 weeks later...

Hello Everyone,

 

I have tried to add  hookActionOrderStatusPostUpdate() in mailalerts module i want to get current order details like qty , price  , merchant name(vendor),shop email and customer details. how do i get that when this hook is executled for the particular order. 

Link to comment
Share on other sites

Hello Nemo , 

 

Thanks for your suggesstions.

 

i used var_dump($params);

die();

 

to check which parameters are returned but i didn't find order object, However i used the following method to retrieve respective object.

 

$order = new Order((int)$params['id_order']);// To get Order Details

$customer = new Customer((int)$order->id_customer);//To get Customer Details

$products = $order->getProducts();//To get Product Details.

  • Like 1
Link to comment
Share on other sites

Hello Guys,

 

I require one help i a m using Agile Multi-Seller Module, I am able to send mails to the  admin i.e merchants, how do i get seller details in this hook ? i require seller details like Seller First Name, Seller Last Name and Email Address of the product in cart .

 

Thank You in Advance.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...