Product not added to cart
Diagnose and fix issues where customized products are not added to the WooCommerce cart.
After a customer finishes customizing a product and clicks Add to Cart, the product should be added to the WooCommerce cart with the customization data. If this fails, the customer may see an error, the page may reload without adding the product, or nothing happens.
Symptoms
- Clicking Add to Cart does nothing or reloads the page.
- The cart remains empty after adding a customized product.
- A WooCommerce error message appears (e.g., "This product cannot be purchased").
- The product is added to cart but without customization data.
Cause 1: Customization required but not completed
If Customization Required is enabled in settings, the product cannot be added to cart until the customer customizes it.
Fix:
- Go to Chamevo β Settings β General β Display.
- Check the Customization Required setting.
- If set to "Any view" or "All views," the customer must make changes before the Add to Cart button works.
- The customizer should show a message indicating customization is needed.
Cause 2: Variable product without selected variation
For WooCommerce variable products, the customer must select a variation before adding to cart.
Fix:
- Check if Customize Button: Variation Needed is enabled in Chamevo β Settings β WooCommerce β Product Page.
- If enabled, the Customize button only appears after the customer selects a variation.
- Verify the WooCommerce product has variations with prices set.
Cause 3: JavaScript error preventing form submission
A JavaScript error can prevent the cart form from submitting.
Fix:
- Open the browser developer tools (F12 β Console tab).
- Click Add to Cart and check for errors.
- Common causes:
- A conflicting plugin that modifies the WooCommerce cart form.
- A theme that overrides the Add to Cart button behavior.
- Deactivate other plugins one by one to isolate the conflict.
Cause 4: Security plugin blocking the request
Security plugins like NinjaFirewall, Wordfence, or Sucuri can block the POST request that carries the customization data because it contains a large JSON payload.
Fix:
- Check your security plugin's log for blocked requests on the product page.