I am text block. Click edit button to change this text. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.
Consectetur
Ullamcorper
Dapibus Leo
Ellit Tellus
Consectetur
Ullamcorper
Dapibus Leo
Ellit Tellus
20+
Years of Experience
Why Choose Our Products
Delicious and Soft
Hygienic Products
Without Preservatives
I am text block. Click edit button to change this text. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.
How do I return an item that was purchased incorrectly?
I am item content. Click edit button to change this text. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.
What should you know before placing an order?
I am item content. Click edit button to change this text. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.
How can I contact the customer service?
I am item content. Click edit button to change this text. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.
How do I get interesting promotions?
I am item content. Click edit button to change this text. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.
How to make payments online?
I am item content. Click edit button to change this text. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.
1.2K+
Is the Number of Partners Who Join Us Throughout the Year
#2
Popular Donuts With the Highest Sales Throughout the Year
2.2K
Client Satisfaction: The Key to Repeat Business
jQuery(function ($) {
/*
* ==========================================
* CUSTOM ALL PRODUCTS CART
* ==========================================
*/
function getExistingCartProductIDs() {
let ids = [];
$('.woocommerce-cart-form__cart-item').each(function () {
let id = $(this).find('.product-remove a').attr('data-product_id');
if (id) {
ids.push(parseInt(id));
}
/*
* Fallback:
* WooCommerce cart item sometimes doesn't expose product ID
*/
let variationID = $(this).find('.product-remove a').attr('data-product_id');
if (variationID) {
ids.push(parseInt(variationID));
}
});
return [...new Set(ids)];
}
/*
* Get product ID from existing cart row
*/
function getCartProductIDs() {
let ids = [];
$('.woocommerce-cart-form__cart-item').each(function () {
let row = $(this);
let id =
row.attr('data-product_id') ||
row.find('.product-remove a').attr('data-product_id') ||
row.find('.product-remove a').data('product_id');
if (id) {
ids.push(parseInt(id));
}
});
return [...new Set(ids)];
}
/*
* Add zero quantity products
*/
function addZeroQuantityProducts() {
if (
typeof window.AllSimpleProducts === 'undefined' ||
!window.AllSimpleProducts.length
) {
return;
}
let tableBody =
$('.woocommerce-cart-form__contents tbody');
if (!tableBody.length) {
return;
}
/*
* Existing products
*/
let existingIDs = [];
tableBody
.find('.woocommerce-cart-form__cart-item')
.each(function () {
let row = $(this);
let productID =
row.attr('data-product_id') ||
row.find('.product-remove a').attr('data-product_id');
if (productID) {
existingIDs.push(parseInt(productID));
}
});
/*
* Add only products not already in cart
*/
window.AllSimpleProducts.forEach(function (product) {
if (
existingIDs.includes(parseInt(product.id))
) {
return;
}
/*
* Don't add duplicate custom rows
*/
if (
tableBody.find(
'[data-zero-product-id="' + product.id + '"]'
).length
) {
return;
}
let disabled = '';
if (
!product.purchasable ||
!product.in_stock
) {
disabled = 'disabled';
}
let stockText = '';
if (product.backorder) {
stockText =
'' +
'Available on backorder' +
'';
}
else if (!product.in_stock) {
stockText =
'' +
'Out of stock' +
'';
}
let imageHTML = '';
if (product.image) {
imageHTML =
'';
}
let rowHTML =
'
';
tableBody.append(rowHTML);
});
/*
* Remove the original X icons
*/
$('.product-remove').remove();
}
/*
* Escape HTML
*/
function escapeHTML(text) {
return $('
')
.text(text)
.html();
}
/*
* Currency
*
* Change ₹ if your WooCommerce
* currency is different.
*/
function wc_price_custom(amount) {
return '$' +
Number(amount).toLocaleString(
'en-US',
{
minimumFractionDigits: 2,
maximumFractionDigits: 2
}
);
}
/*
* ==========================================
* PLUS BUTTON
* ==========================================
*/
$(document).on(
'click',
'.custom-zero-plus',
function () {
let button = $(this);
if (button.prop('disabled')) {
return;
}
let row = button.closest(
'.custom-zero-cart-item'
);
let input = row.find(
'.custom-zero-input'
);
let current =
parseInt(input.val()) || 0;
/*
* First quantity
*/
if (current === 0) {
let productID =
row.attr(
'data-zero-product-id'
);
button.prop('disabled', true);
input.val(1);
/*
* Add to WooCommerce cart
*/
$.ajax({
url: window.CustomCartAjax,
type: 'POST',
data: {
action:
'custom_cart_add_product',
product_id:
productID,
quantity:
1
},
success: function (response) {
if (
response.success
) {
/*
* Reload cart
* so WooCommerce
* handles totals,
* coupons and checkout.
*/
window.location.reload();
}
else {
input.val(0);
button.prop(
'disabled',
false
);
}
},
error: function () {
input.val(0);
button.prop(
'disabled',
false
);
}
});
}
}
);
/*
* ==========================================
* MINUS BUTTON
* ==========================================
*/
$(document).on(
'click',
'.custom-zero-minus',
function () {
let input =
$(this)
.siblings(
'.custom-zero-input'
);
let value =
parseInt(input.val()) || 0;
if (value > 0) {
value--;
}
input.val(value);
}
);
/*
* ==========================================
* INITIAL LOAD
* ==========================================
*/
setTimeout(function () {
addZeroQuantityProducts();
}, 300);
/*
* ==========================================
* WOOCOMMERCE AJAX UPDATE
* ==========================================
*/
$(document.body).on(
'updated_wc_div',
function () {
setTimeout(function () {
addZeroQuantityProducts();
}, 300);
}
);
/*
* ==========================================
* REMOVE X ICON
* ==========================================
*/
$(document).on(
'updated_wc_div',
function () {
$('.product-remove').remove();
}
);
});