• The other day I updated both wordpress and Woocommerce. Sionce then something weird has been happening with our “donation” products in our cart.

    This is the page where both products are displayed, but they both behave identically in their own shop pages

    https://supportourtroops.org/donate/

    The “Patriot Brigade™ Monthly Donor” product is a recurring subscription. CLicking on any of the values makes the “Donate Now” button disappear. This wasn’t happening before.

    The “American Allegiance One Time Gift” instead seems to work fine even if it is essentially using the same logic. The difference is that the broken one is a subscription product while the other is simply a product you buy or “donate”.

    I can’t imagine what could be going wrong, but something definitely is. My guess would be something to do with the way subscriptions are handled.

    I just would like for this donation to work and then I’ll be happy to chase whatever made this happen.

    I’d really appreciate your help here, even if I realize it may not be your code’s fault that creates this issue.

    Thank you.

    https://wordpress.org/plugins/woocommerce-radio-buttons/

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter conticreative1

    (@conticreative1)

    FYI, the product that doesn’t work is this one:

    https://supportourtroops.org/product/recurring-donation/

    while the one that still works is:

    https://supportourtroops.org/product/one-time-donation/

    One more thing I should note: before the update the cart was setup to show a additional button next to the “add to cart” that a user could choose to then go to see the cart. We had to turn that off because this additional button had essentially lost its target and redirected to a 404. I don’t know if this is related, but it happened at the same time.

    Thread Starter conticreative1

    (@conticreative1)

    I wanted to update this thread because I have been doing a bit of messing around with the site to try to narrow down the cause of this behavior.

    For starters, I tried to use a different template, one of the basic WP templates and the behavior didn’t go away. In fact, I tried several very simple templates to make sure something wasn’t interfering.
    Next I tried to deactivate some of the plugins. Again, nothing changed until I deactivated the Radio Buttons plugin itself. That changed the display into a drop down single select field and it made the product work again. So the issue is definitely in the plugin code, or at least part of the issue is in the plugin code for sure.

    What is most puzzling is that the other product, the one without the subscription, still works fine, it’s only the one with the monthly subscription that shows the behavior where the “add to cart” button disappears as soon as a radio button is selected.

    I looked at both products side by side and I cannot find any major difference other than the different type of product, yet they are so similar I cannot understand why one would work and the other wouldn’t.

    I may deactivate this plugins so that at least users are able to donate if they wish. If someone, maybe the developers, would like to take a look at the issue, then I’ll reactivate it for that purpose.

    I really would appreciate hearing from the developers or someone that might have an idea of what is going on.

    Thank you.

    Hello conticreative1,

    I have had a similar issue however I have managed to fix it. The issue is that the JS file: add-to-cart-variation.min.js contains information for a previous version of WooCommerce. I have added a pull request to his git page with a new file. Please try the file: http://www.filedropper.com/add-to-cart-variationmin

    If you replace the same file in his plugin – woocommerce/assets/js/frontend/add-to-cart-variation.min.js

    That should do the trick… worked for me 😉

    Thread Starter conticreative1

    (@conticreative1)

    Thank you so much. I hired a friend to take care of this and he fixed it for me, but I don’t know how. I’ll forward him your suggestion and see if what he did is similar.

    Also, for the record, at the same time that the radio buttons failed, a couple of other things happened:

    1) The “Go to cart” button that appears next to the “add to cart” after adding a product to cart no longer takes a use to the cart but to a 404 page.

    2) We also have a donation page where 2 types of donation “products” are included (with the [bracket] syntax and the product ID). While on the individual product pages in the cart after donating the user is taken automatically to the check out (unlike with regular products which lets you continue browsing the cart) on the page where the donations are included, nothing happens. Doesn’t even seem like the donation is added to cart. It actually is added, but there is no notice for the user.

    We are currently trying to fix these issues. Maybe there is a chance the same fix is also going to fix these behaviors? We’ll try. and report back.

    Thank you.

    Thread Starter conticreative1

    (@conticreative1)

    I have to apologize to you all. I had totally forgotten how we ended up fixing the faulty radio buttons and it didn’t involve messing around with any code.

    Before the radio button broke, we had 2 donations “products”. Each had different amounts a donor could choose from and both worked fine.

    After they broke, by chance we discovered that one product had the donation list written like this:

    $10
    $20
    $50
    $_____

    and that kept working fine. The other however had the list written as such:

    $10 Each month
    $20 Each month
    $50 Each month
    $_____ Each month

    The presence of ” Each month” next to the amount, broke the donation product radio buttons by making the “donate” (would be “add to cart” normally) button disappear after choosing an option in a sick game of whack-a-mo.

    We actually just tried the file Semloh87 suggested, but did not fix the issue (we added the text after the amounts again to test it). So we are pronbably dealing with something a bit more complex on our side.

    Semloh87, did you have a list like ours with plain text choices or just numbers?

    conticreative1,

    I too have the <span> text after our amounts. We have mg listed and prices listed accordingly. We also have additional text with in the radio buttons indicating nonprofit vs. regular pricing. I will attempt the fix above and let you know if it resolves this issue.

    Thanks,

    Thread Starter conticreative1

    (@conticreative1)

    I hope it does for you too. If that’s the case, we need to tell the developers that after the latest round of updates something is preventing alphanumeric strings to display beside the $ amounts. If they can fix that then we can once again use it the way we did before the update.

    If not, then it beats me. We tried a number of things until we discovered this one. Maybe a combo of changes helped us. I don’t know, but the more data we have the better.

    I’ll wait for your post. Thank you for the reply.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Since update, choosing a radio button makes "add to cart" disappear’ is closed to new replies.