Woo commerace not working

There are a few plugins that are not working on my website and its breaking the shopping cart, where you cant add any items to the cart? Is the new betheme compatible with the new updated woo commerce and WordPress?

Comments

  • Hi,

    Please always attach a link to your website so we can check it out. If the page is offline(localhost), then our help will be limited. You will have to contact us when the page is online. Also, please make sure that the page is not under maintenance before you provide us the link.

    It is always a good idea to also attach a screenshot showing your issue.

    Thanks

  • is there a way to go back to an old version of bethme?

  • Can you send me a link to your shop page, please? Unfortunately, I was not able to find it.

    is there a way to go back to an old version of bethme?

    The only option is to restore a backup of your website. If you did not make any, you would have to contact your hosting provider and ask if they do not store a backup from before the update.


    Best regards

  • https://pinelawn.com/shop is the shop URL.

    We have additional custom fields on products which are required in order to add the product to the cart. The adds seem to be failing due to those required fields being missing.

    On the ajax cart add, it does not appear be applying those fields via filters. The cart add also does not provide any feedback to the user that it has failed, but if you navigate to the cart page you can see the failure message.

    A quick rundown of what we have tried:

    • Iteratively disabling and enabling plugins to pinpoint the problem - Disabling the add-on field plugin DOES solve the problem, but this is only because it removes the required fields
    • We have tried this with two plugins (specifically, WC Fields Factory and WooCommerce Product Add-Ons Ultimate) and the problem is the same
    • Unfortunately, there doesn't seem to be any support to turn off the ajax add to cart when using BeTheme
    • Leaving the plugin on but making all fields optional does allow submission, but any field data is lost

    ... so we are thinking the bug is in the application of the filters that supply those custom fields and not something plugin-related

    We have temporarily removed the fields from almost all of our products to at least allow users to check out for the time being, but that requires us to contact them to get the information they could previously supply right on the product page.

    In the meantime, I have added a single required field to ONE product in the store (thankfully, an unpopular one): https://pinelawn.com/product/evergreen-wreath-rosebud-garden-only/

    Let us know if you've had a chance to look and we'll remove that field since it will prevent ordering.

  • Doing a little bit more digging, it seems like this might actually be a limitation in the click handler on single_add_to_cart_button in the theme's woocommerce.js.

    Here's what ends up in $_POST when mfn_woo_ajax_add_to_cart_single() is called in woocommerce-theme.php:

    {"product_id":"790776","action":"woocommerce_ajax_add_to_cart","product_sku":"","add-to-cart":"790776","quantity":"1","variation_id":"0"}

    Based on what I'm seeing here, we may just need to customize that click handler to pull in any custom fields and include them in the formData object that is being passed via the 'adding_to_cart' call?

  • In the meantime we have overridden woocommerce.js and removed the preventDefault / returned immediately (this turns it into a normal form submit)

  • The problem with disabled AJAX will be fixed with today's update.

    Also, the issue with adding products to the cart could be because of a conflict between your plugins and Custom Variations Swatches option from Betheme -> Theme options -> Shop -> General. You can check if the problem persists when you disable this option.

    Thanks

  • Unfortunately, the update will be delayed because of technical issues.

    Probably, it will be released tomorrow.


    Sorry for the obstacles,

    Best regards

  • The new version allows us to turn off the AJAX add to cart setting which does get the 3rd party plugins working again

    It does seem the woocommerce.js in the parent theme would need some kind of update or override to the add_to_cart functionality to automatically pick up any custom fields from those plugins and include them in the POST, so we are required to keep the AJAX setting off to have those plugins work.

  • I will pass this information on to the dev team. We will take your suggestion into account.


    Thanks

Sign In or Register to comment.