Hi,
You don't have all the necessary data in the $order for HikaMarket to be able to handle its process properly.
the "finish" process of the checkout provides a lot more things in $order in which HikaMarket can base itself.
I would recommand to do it differently:
- first, use the "addProduct" function of class.cart to add the products to a cart:
$cartClass = hikashop_get('class.cart');
$cart_id = $cartClass->getCurrentCartId();
$cartClass->addProduct($cart_id, array(array('id'=>XX,'qty'=>YY), array('id'=>AA, 'qty'=>BB)));
where XX is the id of a product and YY its quantity and AA the id of another product and BB its quantity (and you can add more products as well if you want.
- second, convert the cart into an order with the "createFromCart" function of class.order:
$orderClass = hikashop_get('class.order');
$order = $orderClass->createFromCart($cart_id);
That will do a lot more things that you didn't do with your code, it's much more simple, and it will avoid a lot of problems for you.