404 Error on Adding product to cart

carts
products
javascript

#1

Hello im new to moltin and im in the process of developing a vue app however im having issues when adding a product to the cart. I pass in the ID and quantity but it keeps throwing a 404 error saying product not found. This issue is only happening with my personal api key but when i use the test api key in the vue demo store everything works fine. Im wondering if it’s because the product status is set to draft in the moltin dashboard

addToCart: (id,qty) => Moltin.Cart().AddProduct(id,qty),
addToCart: async(context, id, qty) =>{
const cartItem = await MoltinService.addToCart(id,qty)
},
Am i doing something wrong? did i miss something?


#2

Hi @Dan20

The most likely issue here is that the product status is set to draft. Could you check that first?

Thanks,
James


#3

Just did and it worked :grin::grin: thanks


#4

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.