Jump to content

Trigger NewOrder E-Mail Notification


EmanuelHuber

Recommended Posts

Dear all,
 
I'm consulting you regarding a quite tricky situation (at least I think it's tricky :) )
 
We are using Prestashop 1.6. for your online shop in combination with magnalister, a support addon for synchronisation with amazon market place.
 
Status quo:
When an order is triggered in our online shop, let's call it "native" order, the customer receives an order confirmation. With the E-Mail Alerts module, we also receive an e-mail with a notification. That works just fine.
 
When we get an order via amazon, magnalister is importing that order directly into the database, but we don't get any order notification via the mail alert module.
 
Does anyone have an idea how to solve that? I guess there should be a possibility to trigger the mail alert .

 

So I checked the php-code of magnalister. As far as I can see they have a function called "createOrder" where the put together the amazon order to create a database-entry (see attached shoporder.php), the function starts at line 281.

 

Any ideas how to solve that problem? I'd really apreciate it, since it's quite tricky :)

 

Best regards,

Emanuel

ShopOrder.php

Link to comment
Share on other sites

You could add code like the following to call the function manually:

$mailalerts = new MailAlerts();
$mailalerts->hookActionValidateOrder(array('cart' => $cart, 'currency' => $currency, 'order' => $order, 'customer' => $customer, 'orderStatus' => $orderStatus));

You'll need to set $cart, $currency, $order and $orderStatus to the appropriate Cart, Currency, Order and OrderState objects.

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...