• Resolved lws-mo

    (@lws-mo)


    Hi,
    Iam using the newest WP, WooCommerce, and WooThemes Canvas theme.

    On the cart page, I cannot see the shipping selector anymore.
    I cannot select a shipping method the selector is not shown.

    If I do a test order I can see my order in the backend, but no shipping method is selected/saved!

    I can see that an order from 2 days ago, have the shipping info saved. So this always worked. I did not do any change two days before.

    WooCommerce is setup as following:
    Default country: germany
    Allowed countries: specific countries
    Specific allowed countries: germany
    Ship to countries: to countries that I sell to
    Default customer address: default country > germany

    As shipping I have 2 options activated.

    I have a shipping-zone for “germany”, and added free_shipping and local_pickup, as the only options.

    I tried deleting this setup und create it again, nothing is shown on the frontend.

    I tried to activate other countries and tested guest-checkout.

    Please help me ??
    Thanks

Viewing 1 replies (of 1 total)
  • Thread Starter lws-mo

    (@lws-mo)

    Hey, I just resolved this.

    I was checking and testing the WooCommerce template “plugins/woocommerce/templates/cart/cart-totals.php“.

    I than checked “WC()->cart->needs_shipping();“.
    I could see that “WC()->cart->needs_shipping();was always returning “false”.
    But it needs to be “true” to display the shipping radio buttons.

    I remembered that I also had a problem in the past, that the “Ship to a different adress” field was not shown for Safari and Internet Explorer users.
    To fix this I added a line to functions.php:
    add_filter( ‘woocommerce_cart_needs_shipping_address’, ‘__return_true’, 50 );

    However, this line seems not to work for the cart page, as I got “false” every time here. It was working for the checkout page so that “Ship to a different adress” was always visible.
    So I replaced the line, and removed the priority:
    add_filter( ‘woocommerce_cart_needs_shipping’, ‘__return_true’ );
    This is working now!

    • This reply was modified 7 years, 8 months ago by lws-mo.
Viewing 1 replies (of 1 total)
  • The topic ‘Shipping selector not shown on cart page’ is closed to new replies.