The item xxx is no longer available...
Posted: Mon Nov 17, 2008 6:04 pm
We are testing the ablecommerce API on a standalone site with a demo license and have added a few dummy items into our basket. We do not need payment processing and only want orders entered into the site with a pending status. We have the following code in the checkout page:
The checkout response will always return failed, with the following error message:
The item xxx is no longer available. It has been removed from the basket.
for each item we added.
We are able to add the items by manually creating a new order through the backend but keep running in to this problem with the api. We have not set a min or max quantity and do not have inventory tracking turned on, so it is hard to imagine why the product is not available. Any insight into the matter would be greatly appreciated.
Thanks,
Adam
Code: Select all
Token.Instance.User.Basket.Package();
Token.Instance.User.Basket.Recalculate();
foreach (BasketShipment shipment in Token.Instance.User.Basket.Shipments)
{
shipment.ShipMethodId = 1;
}
Token.Instance.User.Basket.Shipments.Save();
Token.Instance.User.Basket.Save();
CheckoutRequest checkoutReq = new CheckoutRequest(null);
CheckoutResponse checkoutResponse = Token.Instance.User.Basket.Checkout(checkoutReq);
The item xxx is no longer available. It has been removed from the basket.
for each item we added.
We are able to add the items by manually creating a new order through the backend but keep running in to this problem with the api. We have not set a min or max quantity and do not have inventory tracking turned on, so it is hard to imagine why the product is not available. Any insight into the matter would be greatly appreciated.
Thanks,
Adam