pberce Posted December 23, 2011 Share Posted December 23, 2011 I'm modifying the order creation process, validateOrder is the function called to create a new order. In this function there is the following code: // Hook new order $orderStatus = new OrderState((int)$id_order_state, (int)$order->id_lang); if (Validate::isLoadedObject($orderStatus)) { Hook::newOrder($cart, $order, $customer, $currency, $orderStatus); foreach ($cart->getProducts() AS $product) if ($orderStatus->logable) ProductSale::addProductSale((int)$product['id_product'], (int)$product['cart_quantity']); } What is the purpose of Hook:newOrder? Is this just here to allow someone to access the code, or "hook", at this point in the process? Link to comment Share on other sites More sharing options...
bellini13 Posted December 23, 2011 Share Posted December 23, 2011 that is actually right. you can create a module that "listens" for the newOrder event. When it fires you can then perform any custom functions you might require. 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