Closed rchoffardet closed 7 years ago
Hello @petitkoalak,
We have such a function! Take a look below:
$product = \CodesWholesale\Resource\Product::get($url);
$code = \CodesWholesale\Resource\Order::createOrder($product);
if($code->isPreOrder()) {
echo "Pre-order";
}
While you creating the order you can recognize that game which has been ordered is PreOrder.
In that case, you can also handle it via receiving postback:
$productOrdered = $client->receiveProductOrdered();
$allCodesFromProduct = \CodesWholesale\Resource\Order::getCodes($productOrdered);
foreach ($allCodesFromProduct as $code) {
if ($code->isPreOrder()) {
// check if still some codes are in pre-order state
echo "Pre-order <br />";
}
}
Simply add your custom URL under our RestAPI tab on app.codeswholesale.com to handle request from CodesWholesale.
Hope that helps you!
Best Regards, Maciej
I knew that. I don't want to detect if the order is a preorder or not, I would like to prevent it.
Hey,
Okey, now I understand. So you want to list only available games with stock.
I am adding it to my tasks.
Best Regards, Maciej
No, I would to have only text or image orders, no preorder. And if there is no stock available, it could send an error message or just an empty result
Hey, any news ? :)
Hello @petitkoalak,
This feature will be added as soon as it is possible.
Best Regards, Maciej
Hey, Do you have any news concerning this issue ? I know it's been but still. :)
Hello there,
Me and my organization would like to have to possibility to get preorder while ordering products from you. Could you add this feature ? Would help a lot :)
Currently we just check the specified product's stock before ordering. But this way is vulnerable to concurrent access and then not 100% secure. So yeah, adding this feature would be great.
regards,