EmanuelHuber Posted February 7, 2017 Share Posted February 7, 2017 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 More sharing options...
EmanuelHuber Posted February 7, 2017 Author Share Posted February 7, 2017 short addition: as far as I know, the mailalerts-module has a hook on hookActionValidateOrder, but magnalister is writing the orders directly into the database, so the hook isn't triggered. is there a way to trigger the hook in the php-code of magnalister? Link to comment Share on other sites More sharing options...
rocky Posted February 9, 2017 Share Posted February 9, 2017 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now