function cart_add(id,sku){









  console.log(id+','+sku);

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

  let myVal=[];

  //console.log(cid)

  price = parseInt(cid.dataset.price);

  variant_id= cid.dataset.sku;

  let val={

  'sku':variant_id,

  'qty':cid.value,

  'weight':parseInt(cid.dataset.weight),

  'size':cid.dataset.size,

  'color':cid.dataset.color,

  'pid':id,

  'price':parseInt(cid.dataset.price)

  }

  let myCart = get_localstorage('cart') || [];

  console.log(val)

  console.log(myCart )

  if(myCart.status==true) {

    let dt2=InsertUpdateArray(myCart.data,val,'sku');

    console.log(dt2)

    set_localstorage('cart', dt2);  

    //set_localstorage('cart', [...myCart.data,...[val]]);  

  } else {

    //console.log(data)

    set_localstorage('cart', [val]);  

  }

}