Hey,
When I try to import { cart } from ‘wix-stores’; I get this error:

‘cart’ is declared but its value is never read.
Module ‘“wix-stores”’ has no exported member ‘cart’.
What am I doing wrong? I have tried this on a normal page, and a wix stores page, no luck on that either.
I followed the api as seen here:
https://www.wix.com/velo/reference/wix-stores/cart/introduction
@yisrael-wix
Any response would be great.
Thanks so much,
Alex
This is the code validation bug, it still works
I cannot use cart though…
Please share your code here in a code block so we can see what you are trying to do.
import { cart } from 'wix-stores'; // I am getting the error here
const customItems =
[{
name: "DESIGN YOUR OWN",
price: 55,
quantity: 1,
note: note
}]
cart.addCustomItems(customItems) // Does not work, it adds the price to the cart, but not the actual product
.then((updatedCart) => {
const cartId = updatedCart._id
const updatedLineItems = updatedCart.lineItems
})
.catch((error) => {
console.log(error);
});
I’m not aware of an addCustomItems() function for the cart. See the cart API for the cart functions that are currently available.
When I try to use “Wix-stores.addCustomItemsToCart()” I get this:

And when I click on that link, I get this:
I also get that same page when I look up “Wix stores add custom items to cart API”
So this is proof that the old Wix Stores add custom items to cart API used to exist, and the newer “cart” add custom items API used to exist. Why have all traces of them been deleted off of Wix.com?
In regards to alternatives to it, we could use the normal “add items to cart”. But, we have variants we want to incorporate. So we can use cart.addProducts().
But, it appears as though the product that we want to add to the cart, is not in the “products” database, so we cannot get the product id. We have added the product through the Wix Dashboard. Is this normal? Do you have another way to get the product id?
Thanks so much for your time,
Alex
@alexobc Aha - so it appears that there is an API deprecation along with a new replacement API that will most likely offer greater flexibility and improved scaling.
I’m going to refer this to the Stores team for evaluation and assistance.
Here’s the story, from the Stores team, regarding the new cart . addCustomItems() API function:
The issue is that the API correctly adds the item to the cart, BUT there is no UI in the cart and checkout. So, only the total field is updated. The item does appear in buyer and merchant emails and in the orders manager. The missing UI in cart and checkout confused the users so it was decided to remove it until the missing UI is added. No ETA yet on the full release.
@yisrael-wix Thanks as so much! Could you please answer my question about the product id?
@alexobc Sorry, but this confuses me (and no, it’s not the beer):
" the product that we want to add to the cart, is not in the “products” database, so we cannot get the product id. We have added the product through the Wix Dashboard "
Why isn’t the product in the Products database? I would think that if you added it to the Store, it would show up somewhere. And, what do you mean by adding it through the Wix Dashboard? Doesn’t that add it to the Store? These questions might be handled better by Customer Care.