kronoszx
4/15/2017 - 12:16 AM

Convert Cart into Order

Convert Cart into Order

//Get cart id from $_POST

$cart_id      = Tools::getvalue('cart_id');
$cart         = new Cart((int)$cart_id);
$order_status = (int)Configuration::get('PS_OS_PAYMENT');
$order_total  = $cart->getOrderTotal(true, Cart::BOTH);
$this->module->validateOrder($cart->id, $order_status, $order_total, "Payment Name Here", null, array(), null, false, $cart->secure_key);