• Resolved mouad09

    (@mouad09)


    I’m trying to add products via the cart->add_to_cart() function, I send the product id and quantity using the feth function to the ajax admin and I get a true message that the product has been added to the cart, but when I go to the cart or chckout I don’t see any products, I see that the cart is empty, but if I try to add the product to the cart via the product page or the shop page, the product is added normally, I’ve deactivated all the extensions and it doesn’t work, I use the hello elementor theme and woocommerce and reactpress a plugin that allows me to use react in wordpress and in react I have like a store with react features, But the biggest problem that makes me angry is that I have the same back end code in another hosting that works fine and adds products to the cart without a problem but the other site is old I used it to just check the code and everything but my main site is the one I modified like changing the pages and deleting the access page and the store page and the cart page because this react project contains everything, I made modifications like changing pages and removing account and store pages because this react project contains everything, but when I ran into this problem I flipped all the pages over to check if the problem came from the fact that I had removed them but no, everything is up to date, I have all the woocommerce pages now the cart the store the account the checkout but I don’t know what the problem is.

    the problem I is that I always see success response allways I don`t see any issue allways success true product added to cart successfully

    this is the result I get from this code : 👇

    this is the code that send product id and product quantity to add it to cart

    this is the backend code : 👇

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.