I used the CoCart_API_Controller
class with some customizations, but after updating the plugin, I now get a “not found” error. It seems that the class has either been deprecated or renamed. How can I resolve this issue?
Hello thank you for the excellent work.
This is all in dev so no urgency, I am working with a local install of WordPress, PHP, etc. and using NextJS as the font end.
I am adding 3 products in sequence in postman, the first product is added to the cart {“id”:”1134″,”quantity”:”1″} using the url : https://localhost/wp-json/cocart/v2/cart/add-item without an issue. When I add the second item I use the cart_key returned as a param in postman as documented, no issues here either and I get two items returned in the response.
The third item is the issue (intermittently or depending on the product sequence strangely enough). I get a postman error as follows:
<html>
<head><title>502 Bad Gateway</title></head>
<body>
<center><h1>502 Bad Gateway</h1></center>
<hr><center>nginx/1.18.0 (Ubuntu)</center>
</body>
</html>
However when I query the cart separately (using the same cart_key in postman: https://localhost/wp-json/cocart/v2/cart/items?cart_key=e7a13688bf9b4d7d864c51f9037f37 I get all three items and their correct quantities.
When I uninstall the enhanced Plugin everything works fine, no 502 errors, but I really need the stock quantities returned from the enhanced plugin as it makes the font end code much simpler (just a single cart array)
]]>is there api for increment or decrement items from cart
i show api for clear all cart but i need to decrement some items only
Dear Sébastien,
Thank you for developing such a great tool.
I was wondering if this plugin is still needed with the latest release of CoCart v3.
Can you give us some advice? Thank you, have a nice day
]]>Hi,
I am using Cocart plugin to fetch the cart details from wordpress website to app. Cart details are fetched correctly when I logged in with administrator access.
When logged in with user access, cart details are not fetched. Is there any option in the plugin to fetch the cart details for user login and how the logged user can get their own cart without giving any token?
Thank you for your help on this…
]]>