Home Forums WoodMart support forum Variable products has an error in the console after update

Variable products has an error in the console after update

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #362176

    lamorim1904
    Participant

    Variable products has an error in the console after update, look print>

    Attachments:
    You must be logged in to view attached files.
    #362215

    Hello,

    Please deactivate all the plugins except these ones:

    Slider Revolution
    WPBakery Page Builder or Elementor
    Woodmart Core
    Contact Form 7
    MailChimp for WordPress
    WooCommerce
    Safe SVG

    If the problem has gone, activate the plugins one by one, checking the issue to detect which one causes the problem.

    In case, the problem remains, even after all the plugins are deactivated, provide your site admin access (insert the site credentials into the Private content block under the message area) and confirm the permission for plugins deactivation, switching to the parent or default theme. As soon as we complete the testing we will enable all back, however, the site would be without plugins for 15-20 min. You would better make the full backup of your site.

    Best Regards

    #362306

    lamorim1904
    Participant

    You’re right, I found the plugin. It started showing this error after the update. This plugin probably won’t support me, do you have any idea why it started to show an error?

    I will copy here the code that is failing.

    plugin: WooCommerce Parcelas Com e Sem Juros

    Error:
    jQuery(window).load(function(){
    (function(){
    $ = jQuery.noConflict();

    function fswp_variable_installment_calculation(){
    var final_price = $(‘.single_variation_wrap .price .amount:last’).text();
    final_price = final_price.match(/\d+/g);
    var final_price_length = Number(final_price.length); ❌error here ❌
    var crude_price = ”;
    var installments_html;

    var i;
    for(i = 1; i < final_price_length; i++){
    crude_price += final_price[i – 1];
    }

    crude_price += ‘.’ + final_price[final_price_length – 1];

    crude_price = Number(crude_price);

    if(crude_price <= installment_minimum_value){
    installments_html = ”;
    }
    else if(crude_price > installment_minimum_value){
    var installments_price = crude_price / installment_qty;
    installments_price = installments_price.toFixed(2);

    if(installments_price < installment_minimum_value){
    var parcelas_menor = installment_qty;
    while(parcelas_menor > 2 && installments_price < installment_minimum_value){
    parcelas_menor–;
    installments_price = crude_price / parcelas_menor;
    installments_price = installments_price.toFixed(2);
    }

    if(installments_price >= installment_minimum_value){
    installments_html = installment_prefix + ‘ ‘ + parcelas_menor + x_de + ‘ <span class=”amount”>’ + formatMoney(cur_symbol, installments_price, 2, dec_sep, th_sep, cur_pos) + ‘</span> ‘ + installment_suffix;
    }
    else{
    installments_html = ”;
    }
    }
    else{
    installments_html = installment_prefix + ‘ ‘ + installment_qty + x_de + ‘ <span class=”amount”>’ + formatMoney(cur_symbol, installments_price, 2, dec_sep, th_sep, cur_pos) + ‘</span> ‘ + installment_suffix;
    }
    }

    $(‘.fswp_variable_installment_calculation’).html(installments_html);
    }

    var default_variation = Number($(‘.single_variation .price’).length);

    if(default_variation){
    fswp_variable_installment_calculation();
    }
    $(‘.variations select’).bind(‘change’, function(){
    setTimeout(function(){
    fswp_variable_installment_calculation();
    }, 100);
    });
    })();
    });

    #362352

    Hello,

    Please contact the plugin support and find out if they have a fix for themes? If they have not, try to find another plugin.

    Please insert the site admin access into the Private content below the message area.

    Best Regards

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