Home Forums WoodMart support forum Free Shipping Progress Bar Error with CURCY

Free Shipping Progress Bar Error with CURCY

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #589987

    sunfaintel
    Participant

    We are experiencing an issue with the free shipping progress bar. We use USD as our default currency and offer free shipping on orders over $50. However, when we convert to other currencies using the WooCommerce Multi Currency plugin(CURCY), the free shipping amount displayed on the progress bar is incorrect. For example, when converting to Saudi Arabian Riyal (SAR), the bar shows 703.24 SAR for free shipping, which is approximately $187.23, which is much higher than our $50 threshold.

    Customers who spend over $50 see the incorrect shipping progress on all pages, but they can still choose free shipping at checkout. We have tried disabling all plugins except Curcy and WooCommerce, but the issue persists.

    It might help to know that when we use the basic version of Curcy with just one additional currency, the progress bar displays the correct amount. The error only occurs when using the premium version with multiple currencies.

    Could you please help us identify what might be causing this issue?

    #590012

    Artem Temos
    Keymaster

    Hello,

    Please disable any plugins not directly related to our theme and provide us with your admin access details. We will log in to your dashboard and investigate the issue. Also, provide us with a video so we can see how to reproduce the issue.
    Please ensure that you only keep the following plugins that are necessary for our theme to work correctly:
    – WoodMart core
    – WooCommerce
    – Elementor/WPBakery Page Builder

    Thank you in advance.

    #590035

    sunfaintel
    Participant

    I have disabled all plugins except for Woodmart, Elementor, and WooCommerce. I also kept CURCY active because the free shipping bar displays incorrectly with this plugin.

    Since our website is actively used by customers, would you mind testing on our staging site instead?

    #590036

    sunfaintel
    Participant

    Here’s the video. You can see that when I added 2 products in the cart. It satisfies the free shipping requirement when it is USD. But in other currencies, such as SAR in this case, it shows that I need to add more products for free shipping.

    • This reply was modified 4 months, 2 weeks ago by sunfaintel.
    Attachments:
    You must be logged in to view attached files.
    #590103

    Artem Temos
    Keymaster

    Try to add the following PHP code snippet to the child theme functions.php file to fix this

    if ( ! function_exists( 'woodmart_curcy_convert_price_limit' ) && defined( 'WOOMULTI_CURRENCY_VERSION' ) ) {
        /**
         * Converse shipping progress bar limit.
         *
         * @param float $limit
         * @return float
         */
        function woodmart_curcy_convert_price_limit( $limit ) {
            $currency_data    = WOOMULTI_CURRENCY_Data::get_ins();
            $currencies       = $currency_data->get_list_currencies();
            $current_currency = $currency_data->get_current_currency();
    
            if ( array_key_exists( $current_currency, $currencies ) ) {
                $limit *= $currencies[ $current_currency ]['rate'];
            }
    
            return $limit;
        }
    
        add_filter( 'woodmart_shipping_progress_bar_amount', 'woodmart_curcy_convert_price_limit' );
    }
    #590179

    sunfaintel
    Participant

    After adding the code you provided, I realized that the issue is due to the limit parameter itself being incorrect. Using “$limit *= $currencies[$current_currency][‘rate’];” only leads to further errors. I tried using “$limit = 50 * $currencies[$current_currency][‘rate’];” which displays the correct amount. However, since we have different free shipping thresholds based on regions, this approach isn’t a proper solution.

    I’m wondering if this $limit issue could be caused by the WoodMart theme or by CURCY? Should I contact CURCY to resolve this issue more effectively?

    #590192

    Artem Temos
    Keymaster

    Try to enable this option instead of using custom and remove the code we provided earlier https://monosnap.com/file/ZUlapj68cfTPWlBSnjtsRamb89d1Fn

Viewing 7 posts - 1 through 7 (of 7 total)