Jump to content

help using function validateOrder


Recommended Posts


I'm trying to develop a module for my company. I need to use create an order from a cart. I have created the cart, and was trying to use validateOrder to create the order.

The problem is that i don't know how to set up the $this->context->cart that the function needs.

Can anyone help, pls? oR know any other way to do this?


Link to comment
Share on other sites

Guess this is a bit complex, and noone knows, or don't want to reveal their secrets...

In the meanwhile i copied the function validateOrder to my script, and made some changes to the variables, that instead of using $this->context->cart, now uses $cart.

Now the error occurs in:

$order_detail->createList($order, $cart, $id_order_state, $order->product_list, 0, true, $package_list[$id_address][$id_package]['id_warehouse']);

(originally was $order_detail->createList($order, $this->context->cart, $id_order_state, $order->product_list, 0, true, $package_list[$id_address][$id_package]['id_warehouse']);)

instead of creating the list, it var_dump's a variable, which i couldn't identify, nor could i identify the error, as it doesn't outputs an error...

Again, if anyone could help...


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