Closed aedogroup closed 8 years ago
Hello,
You can easly get orderId. Please take a look on code below:
foreach ($order->getItems() as $item) { $cwProduct =\CodesWholesale\Resource\Product::get($cwProductId); $codes = \CodesWholesale\Resource\Order::createBatchOrder($cwProduct, array('quantity' => $qty)); $cwOrderId = $codes->getOrderId(); }
Variable $codes will return for you your orderId. Hope it helps ;)
Maciej
There is no such method/function in Resource/Code.php ;(
Am I missing something, or what?
Hello, It is not about Resource/Code but about Resource/CodeList.php ;-)
Anyway, this method $codes->getOrderId() return object orderID like XXXXX-XXXXX-XXXXX-XXXXX, but I would like to get invoice number for bookkeeping.
Is it possible to implement or add new method for those purposes?
Thank you
CreateOrder really should return the order id, for bookkeeping purposes. I don't see any reason why it is not included at the moment.