We all understand that water filtration has become a sign of scientific achievement in the 21st century. Use scientific technology to bring filtration technology to da.....
Your cart is empty.
shop nowWe all understand that water filtration has become a sign of scientific achievement in the 21st century. Use scientific technology to bring filtration technology to da.....
We know that the refrigerator has a built-in filter. However, we may have such questions. Only a clear understanding can find a suitable 1) {
$current_qty = --num;
$data = {
item_id: $item_id,
up_type: "less_one"
};
menu_csrfName = $("#menu_hidden_csrfName").val();
menu_csrfVal = $("#menu_hidden_csrfVal").val();
$data[menu_csrfName] = menu_csrfVal;
// console.log($data);
jQuery.ajax({
async: true,
timeout: 6000,
dataType: 'json',
type: 'post',
data: $data,
url: updateCartInfoUrl,
success: function (data, textStatus) {
if (data.status == 'success') {
$(".ajax_qty_" + $item_id).html($current_qty);
$("#ajax_qty_" + $item_id).val($current_qty);
if ($current_qty == 1) {
$(obj).html("");
$(obj).attr('onclick', "ajaxbtnremove(this)")
}
$(".js_cart_items").html(data.items_count);
$(".ajax-cart-grand_total").html("$" + data.grand_total);
$(".ajax-cart-product_total").html("$" + data.product_total);
$(".ajax-cart-coupon_cost").html("-" + data.coupon_cost);
} else {
alert(data.content);
}
},
error: function (XMLHttpRequest, textStatus, errorThrown) {
}
});
}
}
function ajaxcartqtyup(obj) {
$item_id = $(obj).attr("rel");
$qty = $(".ajax_qty_" + $item_id).text();
$data = {
item_id: $item_id,
up_type: "add_one"
};
menu_csrfName = $("#menu_hidden_csrfName").val();
menu_csrfVal = $("#menu_hidden_csrfVal").val();
$data[menu_csrfName] = menu_csrfVal;
$current_qty = ++$qty;
$.ajax({
async: true,
timeout: 6000,
dataType: 'json',
type: 'post',
data: $data,
url: updateCartInfoUrl,
success: function (data, textStatus) {
if (data.status == 'success') {
$(".ajax_qty_" + $item_id).html($current_qty);
$("#ajax_qty_" + $item_id).val($current_qty);
if ($current_qty > 1) {
$("#ajax_sub_qty_" + $item_id).html("-");
$("#ajax_sub_qty_" + $item_id).attr('onclick', "ajaxcartqtydown(this)")
}
$(".js_cart_items").html(data.items_count);
$(".ajax-cart-grand_total").html("$" + data.grand_total);
$(".ajax-cart-product_total").html("$" + data.product_total);
$(".ajax-cart-coupon_cost").html("-" + data.coupon_cost);
} else {
alert(data.content);
}
},
error: function (XMLHttpRequest, textStatus, errorThrown) {
}
});
}
function ajaxbtnremove(obj) {
$item_id = $(obj).attr("rel");
//gtm
$sku = $(obj).attr("sku");
$price = $(obj).parent().parent().children(".perice").children(".cur").html().substring(1);
$qty = $(obj).parent().parent().children(".ajax-qty-p").children(".num").html();
$name = $(obj).parent().parent().children(".title").html();
$data = {
item_id: $item_id,
up_type: "remove"
};
menu_csrfName = $("#menu_hidden_csrfName").val();
menu_csrfVal = $("#menu_hidden_csrfVal").val();
$data[menu_csrfName] = menu_csrfVal;
// return false;
$.ajax({
async: true,
timeout: 6000,
dataType: 'json',
type: 'post',
data: $data,
url: updateCartInfoUrl,
success: function (data, textStatus) {
if (data.status == 'success') {
dataLayer.push({
'event': 'removeFromCart',
'ecommerce': {
'remove': { // 'remove' actionFieldObject measures.
'products': [{ // removing a product to a shopping cart.
'name': $name,
'id': $sku,
'price': $price,
'quantity': $qty
}]
}
}
});
$(".ajax_tr_" + $item_id).remove();
$(".js_cart_items").html(data.items_count);
$(".ajax-cart-grand_total").html("$" + data.grand_total);
$(".ajax-cart-product_total").html("$" + data.product_total);
$(".ajax-cart-coupon_cost").html("-" + data.coupon_cost);
var tr_length = $(".checkout-cart-table tr").length;
var menu_length = $(".menu-ajax-table tr").length;
if (tr_length == 1 || menu_length == 0) {
$(".checkout-cart-row").html(' Your cart is empty.
\n' +
' Please log in to view the products you have previously added to your Shopping Cart.