• Hi,

    the total price of a composite product is always 0.00 on the product page if you choose the the “base price only” option.

    After debugging a little bit, it is caused by the included “wp-content/plugins/wpc-composite-products-premium/assets/js/frontend.js”.

    In the function wooco_calc_price there is a variable var total_regular = 0; which is never recalculated in case of “base price only”.
    This leads to error mentioned before.

    
    ...
    var total_regular = 0;
    
    if ((pricing === 'only') && (price > 0)) {
      total = price;
    } else {
    ...
    }
    var total_html = wooco_price_html(total_regular, total);

    Not sure which version introduced this bug, but Version 4.1.1 “Updated: Optimized the code” could be the candidate.

    Best!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi

    I started to have a lot of issues with the price calculation in cart and checkout page and I fixed it doing rollback to the plugin version 4.0.3. I don’t know if that could help you; I hope yes.

    By the way, I use Woocommerce (last version), Theme Astra (last version) and WordPress (last version).

    Regards,

    BP

    • This reply was modified 2 years, 9 months ago by Belkis Plaza.
    Thread Starter r1baum

    (@r1baum)

    @bplaza Thank you!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Bug: Total price of a composite product is always 0.00’ is closed to new replies.