Jump to content

Hook code question


pberce

Recommended Posts

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

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