• Resolved elmersw

    (@elmersw)


    I just encountered some strange behaviour on the cart page (using AJAX). And only when using Firefox (not tested all browsers yet).

    Situation:

    I have 2 shipping zones. Each zone has a local pickup option. The other option is delivery or shipping (depending on the postal code). Both methods are standard WC (local pickup and flat rate).

    If I change the shipping address to another zone, the shipping cost are updated and the selected shipping method has a checked radio button. If I change the shipping method to local pickup shipping cost are updated and the local pickup method has a checked radio button. So far, so good.

    When I reload the page, the selected method is still local pickup. However, the radio button for the other method (shipping or delivery) is checked. I have verified the value of $current_shipping_method (= local pickup). The total order amount is based on local pickup as well. When I inspect the HTML element, it becomes even more weird. The local pickup radio button has an attribute checked = “checked”, while the other has not.

    In short, the actual shipping method is not visually checked, while the not select method is visually checked.

    I have tried to rearrange the order of shipping methods in the settings of Woocommerce, but that did not change anything.

    When I proceed to the checkout page, the local pickup method is checked again.

    It seems to me this is not caused in the back-end (PHP), but is the result of javascript (and/or the browser).

    I know there is little chance that a customer will actually experience this behaviour. After some testing, I’m only able to replicate this behaviour when logged in. On top of that I have only tested Firefox, Chrome and Edge yet. In Edge and Chrome it seems to be working fine. So this will even further reduce the chance, but I’d rather get rid of this flaw.

    I’m wondering if anybody else has experienced this behaviour.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi @elmersw!

    Can you share your checkout/site page with us? So we can take a closer look at it.

    Also, since it’s happening only on your firefox when logged in — I know, this is a typical thing to try — but can you clear your browser’s cache?

    All the best,

    Thread Starter elmersw

    (@elmersw)

    Hi @chiape

    Unfortunately I cannot share the live page yet. I’m still in the development phase (local). I do have a screenshot available.

    And yes, I’ve cleared the browser’s cache (over and over again)…

    @elmersw
    ?
    The best way to determine this is to:

    • Temporarily switch your theme to Storefront
    • Disable all plugins except for WooCommerce
    • Repeat the action that is causing the problem

    If you’re not seeing the same problem after completing the conflict test, then you know the problem was with the plugins and/or theme you deactivated. To figure out which plugin is causing the problem, reactivate your other plugins one by one, testing after each, until you find the one causing conflict. You can find a more detailed explanation on how to do a conflict test here.`

    We haven’t heard back from you in a while, so I’m marking this thread as closed for now – we’ll be here if and/or when you are ready to continue.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Cart page: wrong radio button shipping method selected’ is closed to new replies.