function item_size_change(id,price,k,q) {

  $("#price_"+id).html(price); 

  let dt2=get_localstorage('item_pria');

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

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

  style: 'currency',

  currency: 'IDR',

  minimumFractionDigits: 0,

  });  

  //let dt=dt2.data.byid.data[id];

  let dt=dt2.data.byid.data[id];

  let dr=dt2.data.byid.data[id].color_img[k];

  let ds=dt2.data.byid.data[id].color_img[k].stock[q];

  //console.log(q)

  //console.log(dt)

  let size_content =``;

  dt.color_img[k].stock.forEach((v,i)=>{

  if(i==q) {

    size_content +=`

    <a href="#" onclick="item_size_change(${id},'Rp.${v.rp}',${k},${i})">

    <div id="s_${v.variant_id}" class="radio-wrapper-selected">

      <label class="pt-2" for="${v.variant_id}">${v.size}, ${v.stock} pcs, ${v.weight}gr</label>

    </div></a>

   `;

  } else {

    size_content +=`

    <a href="#" onclick="item_size_change(${id},'Rp.${v.rp}',${k},${i})">

    <div id="s_${v.variant_id}" class="radio-wrapper">

      <label class="pt-2" for="${v.variant_id}">${v.size}, ${v.stock} pcs, ${v.weight}gr</label>

    </div></a>

   `;

  }

});

  size_content +=``;

  let btn_cart=`

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

  ${text.add_to_cart}

  </a>

`;  

  document.getElementById('stepper_'+id).style.display = 'block';

  //$$("#stepper_"+id).style.display = 'block';

  $$("#item_size_"+id).html(size_content);

  //<input id="qty_${dt.id}" type="text" data-size="" data-color="" data-sku="" data-price="" value="0" min="0" max="100" step="1" 

  cid.setAttribute('data-sku',ds.variant_id);

  cid.setAttribute('data-size',ds.size);

  cid.setAttribute('data-color',dr.color);

  cid.setAttribute('data-price',ds.price);

  cid.setAttribute('data-weight',ds.weight);

  cid.setAttribute('value',1);

  cid.setAttribute('max',ds.stock);

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

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

 }