Home Forums Themes Support Claue Mayor issue with Product Bundle and ARS (Argentinian Pesos) currency

This topic contains 5 replies, has 3 voices, and was last updated by  Harry 2 days, 18 hours ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #31671
    2players
    Supported

    Hi! Different from others currencies ARS use “,” to separate decimals and “.” for thousand separator. Long-short: it’s backwards.

    The issue: some regex is taking the “.” to only show 2 decimals in the price total in bundle productos.

    <h2>Example:</h2>

    • Product 1 $1.000,00; Product 2 $1.000,00
    • Bundle = 10% discount
    • REAL Final price: $1.800,00
    • Final price Shown: $1.80 (Did you get it? The dot is the problem).

     

    I tried to workaround this problem changing the decimal and thousand symbols from the currency menu. I mean i place “,” to separate thousand and “,” for decimals just as USD do. But the problem persist.

    I I think you can give me a hand here to understand if the problem is the plug-in or the theme (?) and help me to fix it.

     

     

    thanks.

    #31677

    Hi,

    Sorry because inconvenience.

    I’m sorry this issue cause by plugin. It doesn’t calculate the discount percent and discount number when you change “,” to separate decimals and “.” for thousand separator. Please revert to default “,” for thousand separator and “.” to separate decimals. http://prntscr.com/nynhzv

    The function of code will work wrong when switch this, it doesn’t get correct value.

    Kind regards

    Harry
    Premium Wordpress themes and plugins, Best WooCommerce theme https://themeforest.net/user/janstudio/portfolio?ref=janstudio

    #31681
    2players
    Supported

    Please try with ARS, Argentinian Pesos (or Pesos Argentinos in Spanish). The problem is with THAT currency. Straight or backwards.

    Would you upload a ticket to Bundle Plugin for me?

    #31687

    Hi,

    The issue with any Currency when you change change “,” to separate decimals and “.” for thousand separator. We reported this issue with WP Product Bundle plugin author but they can’t fix.

    Kind regards

    Harry
    Premium Wordpress themes and plugins, Best WooCommerce theme https://themeforest.net/user/janstudio/portfolio?ref=janstudio

    #31859
    bghazy
    Supported

    I solved it by editing this function “wpa_wcpb_onchange_input_check_total_discount” at

    “wp-content/plugins/wpa-woocommerce-product-bundle/assets/js/wcpb-frontend.js”

    from this

    jQuery(‘.px-product-bundles input[type=checkbox]:checked’).each(function(){
    var parent = jQuery(this).parent().parent(),
    price = parent.attr(‘data-item-price-with-filter’),
    new_price = parseFloat( price ) – parseFloat( price ) * parseFloat( bundle_percent ) / 100;

    to this

    jQuery(‘.px-product-bundles input[type=checkbox]:checked’).each(function(){

    var parent = jQuery(this).parent().parent(),
    price = parent.attr(‘data-item-price-with-filter’),
    price=parseFloat( price.replace(‘,’, ”) ),
    pricepercent=(price * parseFloat( bundle_percent ) / 100),
    new_price = parseFloat( price ) – pricepercent;

     

    #31864

    @bghazy thank you for share but i tried your function it show wrong number http://prntscr.com/o36ayn

    Kind regards

    Harry
    Premium Wordpress themes and plugins, Best WooCommerce theme https://themeforest.net/user/janstudio/portfolio?ref=janstudio

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

You must be logged in to reply to this topic.