function stepper_min(id) {

  let cid = document.getElementById('qty_'+id);

  //console.log(cid)



  const idrFormatter = new Intl.NumberFormat('id-ID', {

  style: 'currency',

  currency: 'IDR',

  minimumFractionDigits: 0,

  });

  let str;

  let price;

  if (cid != null) {

    str = parseInt(cid.value);

    price = parseInt(cid.dataset.price);

    variant_id= cid.dataset.sku;

  let btn_cart=`

  <a href="#" id="cart_button" onClick="cart_add(`+id+`,'`+variant_id+`')" class="button button-sm bg-danger" data-lang="add_to_cart" style="color:white;">

  ${text.add_to_cart}

  </a>

`;      

    //console.log(str+','+max+','+price);

    if(str>0) { 

      let nstr=--str; 

      //console.log(price);

      //console.log(nstr);

      let price_total=parseInt(price)*parseInt(nstr);

      //console.log(price_total);

      cid.setAttribute('value',nstr);

      $$("#tot_price_"+id).html(idrFormatter.format(price_total));

      if(nstr==0) {

        $$("#toolbar_cart").html('');    

      } else {

        $$("#toolbar_cart").html(btn_cart);    

      }

    } else {

    }

  } 

}