• Resolved prizzrak

    (@prizzrak)


    Hello.

    I wasted a week trying to solve the problem with my shipping calculator on product page. Everithing works fine if I have one destination country. But when I added second contry – it doesn’t work!

    I decided to test on clear site. And fantastic – the same issue!

    Now I have: clear WordPress 6.1.1 and Woocommerce. Nothing else.

    WordPress Environment
    
    WordPress address (URL): https://astera.cc/hugo
    Site address (URL): https://astera.cc/hugo
    WC Version: 5.6.2
    REST API Version: ✔ 5.6.2
    WC Blocks Version: ✔ 5.5.1
    Action Scheduler Version: ✔ 3.2.1
    WC Admin Version: ✔ 2.5.2
    Log Directory Writable: ✔
    WP Version: 6.1.1
    WP Multisite: –
    WP Memory Limit: 512 MB
    WP Debug Mode: –
    WP Cron: ✔
    Language: en_US
    External object cache: –
    
    Server Environment
    
    Server Info: LiteSpeed
    PHP Version: 7.4.33
    PHP Post Max Size: 200 MB
    PHP Time Limit: 30
    PHP Max Input Vars: 10000
    cURL Version: 7.83.1
    NSS/3.79

    I and one product. Add Sell to cpecific countries.

    Add Shipping zones.

    Enabled shipping calculator on the cart page.

    Add product to the cart. On the cart page if I select Germany and it zip code – calculator works.

    If I select Netherlans or Belgium, enter matches zip code then I receive an error <strong>Please enter a valid postcode / ZIP.</strong>

    I would be very appreciated if anyone tell me what’s happening and what am I doing wrong?

    P.S. After some tests I found the second magic. I added in shipping zones to every region ‘Europe’ (means ‘Europe, Germany’; ‘Europe, Netherlands’; ‘Europe, Belgium’). On the cart page in the shipping calculator I choose ‘Germany’ and any of existing zip code from other region – then calculator works! But the country is wrong!

    • This topic was modified 2 years, 11 months ago by prizzrak.

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

Viewing 9 replies - 1 through 9 (of 9 total)
  • Hi @prizzrak

    Thanks for reaching out!

    I wasted a week trying to solve the problem with my shipping calculator on product page. Everithing works fine if I have one destination country. But when I added second contry – it doesn’t work!

    Can you please share with us a clear screenshot of what you see on your end so that we could address you more effectively?

    If you don’t already have a screenshot service installed, you can try https://snipboard.io or http://skitch.com/. You can share the direct link to the image as a response to this topic.

    Meanwhile, I checked your site, added some products to cart, entered Germany as the shipping country, however, I am receiving a different error message here:

    Thanks for sending the System Status Report, however, what you provided is incomplete. Please share your System Status Report that you can find via WooCommerce > Status. Select Get system report and then Copy for support. Once you’ve done that, you can paste it into your reply here.

    WC Version: 5.6.2

    Based on the information provided, please update WooCommerce core to the latest version since the version you are using is quite old.

    Looking forward to your reply.

    Thread Starter prizzrak

    (@prizzrak)

    Hello.

    You show screenshot from checkout page, but I’m talking about the cart!

    I need shipping calculator in cart.

    Once againe I add screenshots of my settings.

    Sell to specific countries. https://snipboard.io/ZAI6lL.jpg

    Add Shipping zones. https://snipboard.io/TJQDfU.jpg

    Now go to the cart, select any shipping country and its zip except first one (Germany).

    For example Netherlands 54000. https://snipboard.io/3NlTIj.jpg

    “Update” and the error is “Please enter a valid postcode / ZIP” but zip I entered is valid! And it works with the first country I added in admin panel (in my case Germany), but doesn’t works with any other. https://snipboard.io/5W49xE.jpg

    WordPress Environment
    
    WordPress address (URL): https://astera.cc/hugo
    Site address (URL): https://astera.cc/hugo
    WC Version: 5.6.2
    REST API Version: ✔</img> 5.6.2
    WC Blocks Version: ✔</img> 5.5.1
    Action Scheduler Version: ✔</img> 3.2.1
    WC Admin Version: ✔</img> 2.5.2
    Log Directory Writable: ✔</img>
    WP Version: 6.1.1
    WP Multisite: –
    WP Memory Limit: 512 MB
    WP Debug Mode: –
    WP Cron: ✔</img>
    Language: en_US
    External object cache: –
    
    Server Environment
    
    Server Info: LiteSpeed
    PHP Version: 7.4.33
    PHP Post Max Size: 200 MB
    PHP Time Limit: 30
    PHP Max Input Vars: 10000
    cURL Version: 7.83.1
    NSS/3.79
    
    SUHOSIN Installed: –
    MySQL Version: 5.7.40-43-log
    Max Upload Size: 200 MB
    Default Timezone is UTC: ✔</img>
    fsockopen/cURL: ✔</img>
    SoapClient: ✔</img>
    DOMDocument: ✔</img>
    GZip: ✔</img>
    Multibyte String: ✔</img>
    Remote Post: ✔</img>
    Remote Get: ✔</img>
    
    Database
    
    WC Database Version: 5.6.2
    WC Database Prefix: wp_
    Total Database Size: 4.30MB
    Database Data Size: 2.90MB
    Database Index Size: 1.40MB
    wp_woocommerce_sessions: Data: 0.02MB + 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.13MB + 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_commentmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_comments: Data: 0.02MB + Index: 0.09MB + Engine InnoDB
    wp_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    wp_options: Data: 2.06MB + Index: 0.03MB + Engine InnoDB
    wp_postmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    wp_posts: Data: 0.02MB + Index: 0.06MB + 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
    
    Post Type Counts
    
    attachment: 1
    page: 7
    post: 2
    product: 1
    
    Security
    
    Secure connection (HTTPS): ✔</img>
    Hide errors from visitors: ✔</img>
    
    Active Plugins (2)
    
    WooCommerce: by Automattic – 5.6.2 (update to version 7.2.2 is available)
    
    Inactive Plugins (0)
    
    Settings
    
    API Enabled: –
    Force SSL: –
    Currency: EUR (€)
    Currency Position: left
    Thousand Separator: .
    Decimal Separator: ,
    Number of Decimals: 2
    Taxonomies: Product Types: external (external)
    grouped (grouped)
    simple (simple)
    variable (variable)
    
    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: #7 - /?page_id=7
    Cart: #8 - /?page_id=8
    Checkout: #9 - /?page_id=9
    My account: #10 - /?page_id=10
    Terms and conditions: ❌</img> Page not set
    
    Theme
    
    Name: Storefront
    Version: 4.2.0
    Author URL: https://woocommerce.com/
    Child Theme: ❌</img> – If you are modifying WooCommerce on a parent theme that you did not build personally we recommend using a child theme. See: How to create a child theme
    WooCommerce Support: ✔</img>
    
    Templates
    
    Overrides: –
    
    Action Scheduler
    
    Complete: 5
    Oldest: 2022-12-21 14:34:36 +0000
    Newest: 2022-12-21 15:37:15 +0000
    
    Status report information
    
    Generated at: 2022-12-26 19:35:49 +03:00
    `

    Based on the information provided, please update WooCommerce core to the latest version since the version you are using is quite old.

    I can’t update WooCommerce because I need to use some plugins that work only WC not higher 5.6.2! There are many different plugins that work quite good only on quite old WC!

    Hi @prizzrak

    I need shipping calculator in cart.

    Thanks for providing further context to your issue here.

    I replicated the scenario on my personal site, however, I am unable to reproduce the issue here.

    Cart page:

    Checkout page:

    I can’t update WooCommerce because I need to use some plugins that work only WC not higher 5.6.2! There are many different plugins that work quite good only on quite old WC!

    I understand, however, in this case, you might experience such problems on your site, since you are using a very old version of WooCommerce already.

    Should you wish to test the latest version of WooCommerce, I’d recommend cloning your site to a staging environment without modifying your live site or impacting customers. Many hosts provide staging facilities, so it’s worth checking in with them. It’s also possible to do it using the free WP Staging plugin.

    Hope this helps!

    Thread Starter prizzrak

    (@prizzrak)

    I replicated the scenario on my personal site, however, I am unable to reproduce the issue here.

    Did you replicate the same shipping zones? At least 2 counties? The first country (in admin panel listing) works, but the second doesn’t.

    Should you wish to test the latest version of WooCommerce,

    Why do you wish me to update, even I explained that it’s impossible in my case?

    And meanwhile don’t you have an intention to solve the issue? All can you suggest is only to update to the latest version?

    I’d be very appreciate to receive from you – as from the plugin developer – any solution to resolve my issue.

    What hooks/filters can I use with shipping calculator in the cart?

    At least where can I find the technical data how shipping calculator works? Ajax calls, functions, hooks? Or is this information prohibited?

    Hello,

    I understand this could be a frustrating issue, 🙁 I was checking on my end, I replicate the same shipping zones, but I could not reproduce the same problem.

    I understand the version of WooCommerce could not be updated easily in your case. Kindly note that WooCommerce is not a static software, it is dynamic, it is constantly making enhancements. And please note in this forum we highly recommend using any of the last 3 versions of WooCommerce Core.

    To help you investigate further, please provide us with the following information:

    • Please share a complete copy of your site’s System Status Report? It is under WooCommerce > Status. Select “Get system report” and then “Copy for support”. 
    • Please share a copy of any fatal error log found under WooCommerce > System Status > Logs (if any).

    Kind regards.

    Thread Starter prizzrak

    (@prizzrak)

    Hello.

    Please share a complete copy of your site’s System Status Report? It is under WooCommerce > Status. Select “Get system report” and then “Copy for support”. 

    Full status in my prev. message.

    Please share a copy of any fatal error log found under WooCommerce > System Status > Logs (if any).

    There is no errors in logs.

     but I could not reproduce the same problem.

    According to your screenshot it is not clear to understand what happened next. I can give you admin access to my site if needed.

    What about my last questions?

    What hooks/filters can I use with shipping calculator in the cart?

    Saif

    (@babylon1999)

    Hello @prizzrak,

    Did you replicate the same shipping zones? At least 2 counties? The first country (in admin panel listing) works, but the second doesn’t.



    > And meanwhile don’t you have an intention to solve the issue? All can you suggest is only to update to the latest version?

    I tried replicating the problem and found some answers.

    But before that I would like to clear this part, we asked you to update because we can only provide support for the latest releases of WooCommerce as per our support policy.

    The problem seems to be caused because of the Netherlands zip code format. You can test this yourself by adding the following zip code 5682. Without the JH part at the end (5682 JH) which is how it should be formatted it will render the same error.

    This was discussed in the following GitHub report: https://github.com/woocommerce/woocommerce/issues/23901

    You can add the snippet provider here to your site as a workaround.

    Hope this clears up the confusion! 😀

    Thread Starter prizzrak

    (@prizzrak)

    It took 4 answers and waste of a lot of your and my time to solve the issue. And the solution is as excepted – to disable “very useful” build in functions! Your support and support policy is awful. Why it needed to collect my data and give null answers if the problem is in your functions? And even support doesn’t know how your plugin works!

    Thanks to @babylon1999 for GitHub link. That snippet is needed to all countries.

    Hi,

    I’m sorry for the experience you had.

    To clarify, please note the information requested is not sensitive, the system status report does not include sensitive information. Sorry for asking that.

    That snippet is needed to all countries.

    I am not a developer, but if you would like to add the same condition (to not enforce the postal code formatting) to all the countries you sell products, i.e. DE, NL, BE, and LU, the snippet will look like this:

    add_filter( 'woocommerce_validate_postcode', 'custom_disable_nl_postcode_validation', 10, 3 );
    function custom_disable_nl_postcode_validation( $valid, $postcode, $country ) {
    if ( 'NL' === $country || 'DE' === $country || 'LU' === $country || 'BE' === $country ) {
    return true;
    }
    return $valid;
    }

    I hope this helps.

    • This reply was modified 2 years, 10 months ago by Igor H.
Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘Shipping Calculator in cart – Please enter a valid postcode / ZIP.’ is closed to new replies.