• Resolved joshroper

    (@joshroper)


    Hi, I want customers to be required to select their shipping method on the cart page before getting to the checkout page. I have been through all of the Woocommerce settings and support documentations but haven’t found what I need.

    Basically, they shouldn’t be allowed to hit “Proceed to Checkout” button without choosing a shipping method, which requires them to enter a City and Zipcode. And I don’t want a pre-selected option, because we have a 30 mile delivery radius & a local pickup option. We’d like them to select which type of option first so that way it’s preselected when they get to the checkout page, and they know whether they’re within the delivery radius or not.

    Right now, I have a php code that does something similar to what I’d like the final solution to be. It creates a browser popup saying “Please choose Delivery Method before going to Checkout.” This is not ideal for two reasons:
    1) The code disables on button click, so if someone clicks “update” on the shipping calculator without inserting real zip code, they are still allowed to go to checkout.
    2) The popup feels janky. It doesn’t feel as nice as the default Woocommerce error messages.

    Here’s where I got that current code from: https://softound.com/require-shipping-calculator-before-proceed-checkout-woocommerce/

    Thanks

    Here’s my Woo System Status:

    ### WordPress Environment ###

    WordPress address (URL): https://voixly.space/plants
    Site address (URL): https://voixly.space/plants
    WC Version: 4.7.0
    REST API Version: ? 4.7.0
    WC Blocks Version: ? 3.6.0
    Action Scheduler Version: ? 3.1.6
    WC Admin Version: ? 1.6.3
    Log Directory Writable: ?
    WP Version: 5.5.3
    WP Multisite: –
    WP Memory Limit: 2 GB
    WP Debug Mode: –
    WP Cron: ?
    Language: en_US
    External object cache: –

    ### Server Environment ###

    Server Info: LiteSpeed
    PHP Version: 7.4.11
    PHP Post Max Size: 1 GB
    PHP Time Limit: 300
    PHP Max Input Vars: 5000
    cURL Version: 7.71.0
    OpenSSL/1.1.1d

    SUHOSIN Installed: –
    MySQL Version: 5.5.5-10.3.24-MariaDB-cll-lve
    Max Upload Size: 1 GB
    Default Timezone is UTC: ?
    fsockopen/cURL: ?
    SoapClient: ?
    DOMDocument: ?
    GZip: ?
    Multibyte String: ?
    Remote Post: ?
    Remote Get: ?

    ### Database ###

    WC Database Version: 4.7.0
    WC Database Prefix: wp_
    Total Database Size: 7.85MB
    Database Data Size: 5.96MB
    Database Index Size: 1.89MB
    wp_woocommerce_sessions: Data: 0.13MB + Index: 0.02MB + Engine InnoDB
    wp_woocommerce_api_keys: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_woocommerce_attribute_taxonomies: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_woocommerce_downloadable_product_permissions: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
    wp_woocommerce_order_items: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_woocommerce_order_itemmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_woocommerce_tax_rates: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
    wp_woocommerce_tax_rate_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_woocommerce_shipping_zones: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_woocommerce_shipping_zone_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_woocommerce_shipping_zone_methods: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_woocommerce_payment_tokens: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_woocommerce_payment_tokenmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_woocommerce_log: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_actionscheduler_actions: Data: 0.02MB + Index: 0.11MB + Engine InnoDB
    wp_actionscheduler_claims: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_actionscheduler_groups: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_actionscheduler_logs: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_adtribes_my_conversions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_commentmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_comments: Data: 0.02MB + Index: 0.09MB + Engine InnoDB
    wp_layerslider: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_layerslider_revisions: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_options: Data: 2.44MB + Index: 0.09MB + Engine InnoDB
    wp_postmeta: Data: 1.52MB + Index: 0.09MB + Engine InnoDB
    wp_posts: Data: 0.08MB + Index: 0.06MB + Engine InnoDB
    wp_revslider_css: Data: 0.13MB + Index: 0.00MB + Engine InnoDB
    wp_revslider_css_bkp: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_revslider_layer_animations: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_revslider_layer_animations_bkp: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_revslider_navigations: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_revslider_navigations_bkp: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_revslider_sliders: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_revslider_sliders_bkp: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_revslider_slides: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_revslider_slides_bkp: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_revslider_static_slides: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_revslider_static_slides_bkp: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_simple_history: Data: 0.08MB + Index: 0.03MB + Engine InnoDB
    wp_simple_history_contexts: Data: 0.44MB + Index: 0.28MB + Engine InnoDB
    wp_termmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_terms: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_term_relationships: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_term_taxonomy: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_usermeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_users: Data: 0.02MB + Index: 0.05MB + Engine InnoDB
    wp_wc_admin_notes: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_wc_admin_note_actions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_wc_category_lookup: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_wc_customer_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_wc_download_log: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_wc_order_coupon_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_wc_order_product_lookup: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
    wp_wc_order_stats: Data: 0.02MB + Index: 0.05MB + Engine InnoDB
    wp_wc_order_tax_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_wc_product_meta_lookup: Data: 0.02MB + Index: 0.09MB + Engine InnoDB
    wp_wc_reserved_stock: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_wc_tax_rate_classes: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_wc_webhooks: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_woocommerce_bundled_itemmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_woocommerce_bundled_items: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_woocommerce_square_customers: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    wp_wpforms_tasks_meta: Data: 0.02MB + Index: 0.00MB + Engine InnoDB

    ### Post Type Counts ###

    attachment: 86
    nav_menu_item: 4
    page: 12
    post: 7
    product: 13
    product_variation: 6
    revision: 12
    testimonial: 3
    wpcf7_contact_form: 1

    ### Security ###

    Secure connection (HTTPS): ?
    Your store is not using HTTPS. Learn more about HTTPS and SSL Certificates.
    Hide errors from visitors: ?

    ### Active Plugins (12) ###

    ManageWP – Worker: by GoDaddy – 4.9.7
    LayerSlider WP: by Kreatura Media – 6.11.2
    Classic Editor: by WordPress Contributors – 1.6
    Contact Form 7: by Takayuki Miyoshi – 5.3
    WooCommerce Continue Shopping: by HappyKite – 1.4.3 – Installed version not tested with active version of WooCommerce 4.7.0
    Yoast Duplicate Post: by Enrico Battocchi & Team Yoast – 3.2.6
    Flexible Checkout Fields: by WP Desk – 2.7.0 – Installed version not tested with active version of WooCommerce 4.7.0
    Flexible Shipping: by WP Desk – 3.16.4
    Slider Revolution: by ThemePunch – 6.2.22
    Simple History: by P?r Thernstr?m – 2.38.0
    WooCommerce Square: by WooCommerce – 2.2.5
    WooCommerce: by Automattic – 4.7.0 (update to version 4.7.1 is available)

    ### Inactive Plugins (3) ###

    Checkout Field Editor for WooCommerce: by ThemeHigh – 1.4.4 – Installed version not tested with active version of WooCommerce 4.7.0
    WooCommerce Order Delivery: by Themesquad – 1.8.4
    WooCommerce Product Bundles: by SomewhereWarm – 6.5.1

    ### Must Use Plugins (1) ###

    ManageWP – Worker Loader: by GoDaddy –

    ### Settings ###

    API Enabled: –
    Force SSL: –
    Currency: USD ($)
    Currency Position: left
    Thousand Separator: ,
    Decimal Separator: .
    Number of Decimals: 2
    Taxonomies: Product Types: bundle (bundle)
    external (external)
    grouped (grouped)
    simple (simple)
    variable (variable)
    woosb (woosb)

    Taxonomies: Product Visibility: exclude-from-catalog (exclude-from-catalog)
    exclude-from-search (exclude-from-search)
    featured (featured)
    outofstock (outofstock)
    rated-1 (rated-1)
    rated-2 (rated-2)
    rated-3 (rated-3)
    rated-4 (rated-4)
    rated-5 (rated-5)

    Connected to WooCommerce.com: –

    ### WC Pages ###

    Shop base: #2331 – /index.php/products/
    Cart: #2332 – /index.php/cart/
    Checkout: #2333 – /index.php/checkout/
    My account: #2334 – /index.php/my-account/
    Terms and conditions: ? Page not set

    ### Theme ###

    Name: Betheme Child
    Version: 1.6.2
    Author URL: https://muffingroup.com
    Child Theme: ?
    Parent Theme Name: Betheme
    Parent Theme Version: 21.8.9
    Parent Theme Author URL: https://muffingroup.com/
    WooCommerce Support: ?

    ### Templates ###

    Overrides: betheme/woocommerce/archive-product.php
    betheme/woocommerce/cart/cart.php
    betheme/woocommerce/cart/mini-cart.php
    betheme/woocommerce/content-product.php
    betheme/woocommerce/content-single-product.php
    betheme/woocommerce/loop/loop-end.php
    betheme/woocommerce/loop/loop-start.php
    betheme/woocommerce/loop/no-products-found.php
    betheme/woocommerce/loop/pagination.php
    betheme/woocommerce/notices/error.php
    betheme/woocommerce/notices/notice.php
    betheme/woocommerce/notices/success.php
    betheme/woocommerce/single-product/add-to-cart/external.php
    betheme/woocommerce/single-product/product-image.php
    betheme/woocommerce/single-product/product-thumbnails.php
    betheme/woocommerce/single-product/sale-flash.php
    betheme/woocommerce/single-product/tabs/additional-information.php
    betheme/woocommerce/single-product/tabs/description.php
    betheme/woocommerce/single-product/tabs/tabs.php
    betheme/woocommerce/single-product/title.php

    ### Square ###

    Environment: Production
    Tokenization Enabled: –
    Debug Mode: Off

    ### Action Scheduler ###

    Complete: 33
    Oldest: 2020-11-11 18:49:06 +0000
    Newest: 2020-12-07 18:39:31 +0000

    Pending: 1
    Oldest: 2020-12-09 15:57:22 +0000
    Newest: 2020-12-09 15:57:22 +0000

    `

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Require Shipping Method Selection In Cart Page’ is closed to new replies.