Page 1 of 1

The item xxx is no longer available...

Posted: Mon Nov 17, 2008 6:04 pm
by adamh
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:

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 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

Re: The item xxx is no longer available...

Posted: Tue Nov 18, 2008 5:36 am
by mazhar
Make sure the items you are adding to the basket do exist in the database and their visibility is not private. If product contains the option then make sure that you are using a valid variant and the variant isn't marked as not available.

Re: The item xxx is no longer available...

Posted: Tue Nov 18, 2008 12:15 pm
by adamh
Thank you! did not select a variant

Re: The item xxx is no longer available...

Posted: Mon Sep 19, 2011 4:59 pm
by silvercreative
we are having this same error message come up. we have drinks in 3 flavors. we created a new product called subscription (we know that we will need to manually enter the shipping details) we added a variant for the 3 flavors which will allow the user to select which flavor they want to recieve in their subscription. However, when we go to check out we recieve the "no longer available" error. we have inventory disabled so that is not the issue.

in this pot you mention, make sure the product is in the database. what do you mean by that?

thanks

/paul