// Unobtrusive Ajax support library for jQuery // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. // @version // // Microsoft grants you the right to use these script files for the sole // purpose of either: (i) interacting through your browser with the Microsoft // website or online service, subject to the applicable licensing or use // terms; or (ii) using the files as included with a Microsoft product subject // to that product's license terms. Microsoft reserves all other rights to the // files not expressly granted by Microsoft, whether by implication, estoppel // or otherwise. Insofar as a script file is dual licensed under GPL, // Microsoft neither took the code under GPL nor distributes it thereunder but // under the terms set out in this paragraph. All notices and licenses // below are for informational purposes only. /*jslint white: true, browser: true, onevar: true, undef: true, nomen: true, eqeqeq: true, plusplus: true, bitwise: true, regexp: true, newcap: true, immed: true, strict: false */ /*global window: false, jQuery: false */ (function ($) { var data_click = "unobtrusiveAjaxClick", data_target = "unobtrusiveAjaxClickTarget", data_validation = "unobtrusiveValidation"; function getFunction(code, argNames) { var fn = window, parts = (code || "").split("."); while (fn && parts.length) { fn = fn[parts.shift()]; } if (typeof (fn) === "function") { return fn; } argNames.push(code); return Function.constructor.apply(null, argNames); } function isMethodProxySafe(method) { return method === "GET" || method === "POST"; } function asyncOnBeforeSend(xhr, method) { if (!isMethodProxySafe(method)) { xhr.setRequestHeader("X-HTTP-Method-Override", method); } } function asyncOnSuccess(element, data, contentType) { var mode; if (contentType.indexOf("application/x-javascript") !== -1) { // jQuery already executes JavaScript for us return; } mode = (element.getAttribute("data-ajax-mode") || "").toUpperCase(); $(element.getAttribute("data-ajax-update")).each(function (i, update) { var top; switch (mode) { case "BEFORE": $(update).prepend(data); break; case "AFTER": $(update).append(data); break; case "REPLACE-WITH": $(update).replaceWith(data); break; default: $(update).html(data); break; } }); } function asyncRequest(element, options) { var confirm, loading, method, duration; confirm = element.getAttribute("data-ajax-confirm"); if (confirm && !window.confirm(confirm)) { return; } loading = $(element.getAttribute("data-ajax-loading")); duration = parseInt(element.getAttribute("data-ajax-loading-duration"), 10) || 0; $.extend(options, { type: element.getAttribute("data-ajax-method") || undefined, url: element.getAttribute("data-ajax-url") || undefined, cache: (element.getAttribute("data-ajax-cache") || "").toLowerCase() === "true", beforeSend: function (xhr) { var result; asyncOnBeforeSend(xhr, method); result = getFunction(element.getAttribute("data-ajax-begin"), ["xhr"]).apply(element, arguments); if (result !== false) { loading.show(duration); } return result; }, complete: function () { loading.hide(duration); getFunction(element.getAttribute("data-ajax-complete"), ["xhr", "status"]).apply(element, arguments); }, success: function (data, status, xhr) { asyncOnSuccess(element, data, xhr.getResponseHeader("Content-Type") || "text/html"); getFunction(element.getAttribute("data-ajax-success"), ["data", "status", "xhr"]).apply(element, arguments); }, error: function () { getFunction(element.getAttribute("data-ajax-failure"), ["xhr", "status", "error"]).apply(element, arguments); } }); options.data.push({ name: "X-Requested-With", value: "XMLHttpRequest" }); method = options.type.toUpperCase(); if (!isMethodProxySafe(method)) { options.type = "POST"; options.data.push({ name: "X-HTTP-Method-Override", value: method }); } // change here: // Check for a Form POST with enctype=multipart/form-data // add the input file that were not previously included in the serializeArray() // set processData and contentType to false var $element = $(element); if ($element.is("form") && $element.attr("enctype") == "multipart/form-data") { var formdata = new FormData(); $.each(options.data, function (i, v) { formdata.append(v.name, v.value); }); $("input[type=file]", $element).each(function () { var file = this; $.each(file.files, function (n, v) { formdata.append(file.name, v); }); }); $.extend(options, { processData: false, contentType: false, data: formdata }); } // end change $.ajax(options); } function validate(form) { var validationInfo = $(form).data(data_validation); return !validationInfo || !validationInfo.validate || validationInfo.validate(); } $(document).on("click", "a[data-ajax=true]", function (evt) { evt.preventDefault(); asyncRequest(this, { url: this.href, type: "GET", data: [] }); }); $(document).on("click", "form[data-ajax=true] input[type=image]", function (evt) { var name = evt.target.name, target = $(evt.target), form = $(target.parents("form")[0]), offset = target.offset(); form.data(data_click, [ { name: name + ".x", value: Math.round(evt.pageX - offset.left) }, { name: name + ".y", value: Math.round(evt.pageY - offset.top) } ]); setTimeout(function () { form.removeData(data_click); }, 0); }); $(document).on("click", "form[data-ajax=true] :submit", function (evt) { var name = evt.currentTarget.name, target = $(evt.target), form = $(target.parents("form")[0]); form.data(data_click, name ? [{ name: name, value: evt.currentTarget.value }] : []); form.data(data_target, target); setTimeout(function () { form.removeData(data_click); form.removeData(data_target); }, 0); }); $(document).on("submit", "form[data-ajax=true]", function (evt) { var clickInfo = $(this).data(data_click) || [], clickTarget = $(this).data(data_target), isCancel = clickTarget && (clickTarget.hasClass("cancel") || clickTarget.attr('formnovalidate') !== undefined); evt.preventDefault(); if (!isCancel && !validate(this)) { return; } asyncRequest(this, { url: this.action, type: this.method || "GET", data: clickInfo.concat($(this).serializeArray()) }); }); }(jQuery)); function getDocumentCookie(name) { function escape(s) { return s.replace(/([.*+?\^$(){}|\[\]\/\\])/g, '\\$1'); } var match = document.cookie.match(RegExp('(?:^|;\\s*)' + escape(name) + '=([^;]*)')); return match ? match[1] : null; } !function (a) { markiteeModule.cartAdded = function () { //var cartCookies = JSON.stringify(JSON.parse(Cookies.get("Markitee_cart_popUp"))); var cartCookies = JSON.stringify(JSON.parse(decodeURIComponent(getDocumentCookie("Markitee_cart_popUp")))); if (null !== cartCookies && cartCookies !== undefined && "" !== cartCookies && cartCookies.length > 10 && cartCookies != null) { var CartList = []; var _obj = JSON.parse(JSON.stringify(cartCookies)); CartList = JSON.parse(JSON.stringify(JSON.parse(_obj).CartList)); if (CartList.length) { var items = ``); a('.shopping-cart-widget-footer').html(`

المبلغ: `+ JSON.parse(_obj).TOTAL + `جنيه

اظهار السلةشراء

`); } }else { var emptyState = `

لايوجد منتجات فى السلة.

العودة للتسوق
`; a('.shopping-cart-widget-body .wd-scroll-content').html(emptyState); } }, a(document).ready(function () { markiteeModule.cartAdded() }) }(jQuery); jQuery(function (d) { if ("undefined" == typeof wc_add_to_cart_params) return !1; var t = function () { this.requests = [], this.addRequest = this.addRequest.bind(this), this.run = this.run.bind(this), d(document.body).on("click", ".add_to_cart_button", { addToCartHandler: this }, this.onAddToCart).on("click", ".remove_from_cart_button", { addToCartHandler: this }, this.onRemoveFromCart) .on("added_to_cart", this.updateButton) .on("ajax_request_not_sent.adding_to_cart", this.updateButton) .on("added_to_cart removed_from_cart", { addToCartHandler: this }, this.updateFragments) }; t.prototype.addRequest = function (t) { this.requests.push(t), 1 === this.requests.length && this.run() }, t.prototype.run = function () { var t = this, a = t.requests[0].complete; t.requests[0].complete = function () { "function" == typeof a && a(), t.requests.shift(), 0 < t.requests.length && t.run() }, d.ajax(this.requests[0]) }, t.prototype.onAddToCart = function (t) { t.preventDefault(); var a = d(this); if (a.is(".ajax_add_to_cart")) { //alert('hiiiii'); if (!a.attr("data-product_id")) return !0; if (t.preventDefault(), a.removeClass("added"), a.addClass("loading"), !1 === d(document.body) .triggerHandler("should_send_ajax_request.adding_to_cart", [a])) return d(document.body) .trigger("ajax_request_not_sent.adding_to_cart", [!1, !1, a]), !0; var e = {}; d.each(a.data(), function (t, a) { e[t] = a }), d.each(a[0].dataset, function (t, a) { e[t] = a }), d(document.body).trigger("adding_to_cart", [a, e]), t.data.addToCartHandler.addRequest({ type: "POST", //url: wc_add_to_cart_params.wc_ajax_url.toString() url: "/cart/saveCartProduct",//.toString().replace("%%endpoint%%", "addtocart"), data: e, success: function (t) { // Cookies.set('Markitee_cart_popUp', JSON.stringify(t), { expires: 2 }); //if (document.getElementsByClassName("cart_list").length > 0) //{ var items = ``); d('.shopping-cart-widget-footer').html(`

المبلغ: `+ t.TOTAL + `جنيه

اظهار السلةشراء

`); var cartCountList = document.getElementsByClassName("wd-cart-number"); for (var i = 0; i < cartCountList.length; i++) { d(cartCountList).html(cartCount + 1); } var cartTotalList = document.getElementsByClassName("markitee-cart-totals"); for (var i = 0; i < cartTotalList.length; i++) { d(cartTotalList).html(t.TOTAL + " جنيه"); } cartTotal(d, t.TOTAL, t.offerfound, t.quantity); //} //else //{ // var newCart = ``; // d('.shopping-cart-widget-body .wd-scroll-content').html(newCart); //} d(document.body).trigger("added_to_cart", [t.fragments, t.cart_hash, a]); //t && (t.error && t.product_url // ? window.location = t.product_url // : "yes" // !== wc_add_to_cart_params.cart_redirect_after_add // ? d(document.body).trigger("added_to_cart", // [t.fragments, t.cart_hash, a]) : // window.location = wc_add_to_cart_params.cart_url) } , dataType: "json" }) } if (a.is(".added")) { d(document.body).trigger("added_to_cart", [t.fragments, t.cart_hash, a]); } }, t.prototype.onRemoveFromCart = function (t) { //alert('iii'); var a = d(this), e = a.closest(".woocommerce-mini-cart-item"); t.preventDefault(), e.block({ message: null, overlayCSS: { opacity: .6 } }), t.data.addToCartHandler .addRequest({ type: "POST", //url: wc_add_to_cart_params.wc_ajax_url.toString().replace("%%endpoint%%", "remove_from_cart"), url: "/cart/saveCartProductPage".toString().replace("%%endpoint%%", "remove_from_cart"), data: { product_id: a.data("product_id"), product_sku: a.data("cart_item_key"), quantity: 1, action: "remove_from_cart" //a.parent().children[2].querySelector(".qty").val() }, success: function (t) { // Cookies.set('Markitee_cart_popUp', JSON.stringify(t), { expires: 2 }); if (a.hasClass("TrRemove")) { a.parent().parent().remove(); } else { a.parent().remove(); } //t && t.fragments ? //if (d(".cart_list li").length > 0) var _obj = []; _obj = JSON.parse(JSON.stringify(t.CartList)); if (_obj.length > 0) { //alert('hi00'); var cartCountList = document.getElementsByClassName("wd-cart-number"); for (var i = 0; i < cartCountList.length; i++) { d(cartCountList).html(t.cartCount); } var cartTotalList = document.getElementsByClassName("markitee-cart-totals"); for (var i = 0; i < cartTotalList.length; i++) { d(cartTotalList).html(t.TOTAL + " جنيه"); } cartTotal(d, t.TOTAL, t.offerfound, t.quantity); var totalprice = document.getElementById("totalprice"); d(totalprice).html(t.TOTAL + `جنيه`); // markiteeModule.$body.trigger("removed_from_cart", [c, d, e]); } else { var emptyState = `

لايوجد منتجات فى السلة.

العودة للتسوق
`; d('.shopping-cart-widget-body .wd-scroll-content').html(emptyState); d(document.body).trigger("removed_from_cart", [t.fragments, t.cart_hash, a]) d('.shopping-cart-widget-footer').html(''); var cartCountList = document.getElementsByClassName("wd-cart-number"); for (var i = 0; i < cartCountList.length; i++) { d(cartCountList).html(0); } var cartTotalList = document.getElementsByClassName("markitee-cart-totals"); for (var i = 0; i < cartTotalList.length; i++) { d(cartTotalList).html("0 جنيه"); } cartTotal(d, 0,"",0); } const el1 = document.querySelector('[href="?add-to-cart=' + a.data("product_id") + '"]'); d(el1).removeClass("wd-tooltip-inited"); d(el1).removeClass("added"); d(el1).addClass("ajax_add_to_cart"); d(el1).addClass("add-to-cart-loop"); d(el1).parent().replaceWith(`
Add to cart
`); }, error: function () { //window.location = a.attr("href") } , dataType: "json" }) }, t.prototype.updateButton = function (t, a, e, r) { //(r = void 0 !== r && r)&& ( r.removeClass("loading");//, a && r.parent().removeClass("wd-add-btn"); r.addClass("added");//, //safaa //r.removeClass("add_to_cart_button"); r.removeClass("ajax_add_to_cart"); r.removeClass("add-to-cart-loop"); //a &&!wc_add_to_cart_params.is_cart && // 0 === r.parent().find(".added_to_cart").length && r.after('' + wc_add_to_cart_params.i18n_view_cart + "");//, //safaa r.parent().removeClass("wd-add-btn-replace").addClass("wd-action-btn wd-style-icon wd-add-cart-icon"); d(document.body).trigger("wc_cart_button_updated", [r]);//) }, t.prototype.updateFragments = function (t, a) { //alert('update33'); a && (d.each(a, function (t) { d(t).addClass("updating").fadeTo("400", "0.6").block( { message: null, overlayCSS: { opacity: .6 } }) }), d.each(a, function (t, a) { d(t).replaceWith(a), d(t).stop(!0).css("opacity", "1").unblock() }), d(document.body).trigger("wc_fragments_loaded")) }, new t }); (function ($) { 'use strict'; $(document).ready(function () { $('body').on('adding_to_cart', function (event, $button, data) { //alert('uuuu'); if ($button && $button.hasClass('vc_gitem-link')) { $button.addClass('vc-gitem-add-to-cart-loading-btn') .parents('.vc_grid-item-mini') .addClass('vc-woocommerce-add-to-cart-loading') .append($('
')) } }).on('added_to_cart', function (event, fragments, cart_hash, $button) { // console.log('button'); console.log($button); if ('undefined' === typeof ($button)) { $button = $('.vc-gitem-add-to-cart-loading-btn') } if ($button && $button.hasClass('vc_gitem-link')) { $button.removeClass('vc-gitem-add-to-cart-loading-btn') .parents('.vc_grid-item-mini') .removeClass('vc-woocommerce-add-to-cart-loading') .find('.vc_wc-load-add-to-loader-wrapper').remove() } }) }) })(window.jQuery); !function (a) { markiteeModule.miniCartQuantity = function () { var b; markiteeModule.$document.on("change input", ".woocommerce-mini-cart .quantity .qty,.cart_item .quantity .qty", function () { //alert('mmmm'); var c = a(this), d = c.val(), e = c.parents(".woocommerce-mini-cart-item").data("key"), isCartpage = c.parents(".woocommerce-mini-cart-item").data("page"), f = markitee_settings.cart_hash_key, g = markitee_settings.fragment_name; clearTimeout(b), b = setTimeout(function () { c.parents(".mini_cart_item").addClass("wd-loading"), a.ajax({ //url: markitee_settings.ajaxurl, url: "/cart/saveCartProductPage", data: { action: "woodmart_update_cart_item", product_id: c.parents(".woocommerce-mini-cart-item").data("product_id"), product_sku: e, quantity: d }, success: function (b) { // Cookies.set('Markitee_cart_popUp', JSON.stringify(b), { expires: 2 }); var items = ``); a('.shopping-cart-widget-footer').html(`

المبلغ: `+ b.TOTAL + `جنيه

اظهار السلةشراء

`); var cartCountList = document.getElementsByClassName("wd-cart-number"); for (var i = 0; i < cartCountList.length; i++) { a(cartCountList).html(cartCount + 1); } var cartTotalList = document.getElementsByClassName("markitee-cart-totals"); for (var i = 0; i < cartTotalList.length; i++) { a(cartTotalList).html(b.TOTAL + " جنيه"); } cartTotal(a, b.TOTAL, b.offerfound, b.q); }, dataType: "json", method: "post" }) }, 500) }) }, a(document).ready(function () { markiteeModule.miniCartQuantity() }) }(jQuery); //!function (a) { // markiteeModule.addToCartAllTypes222 = function () { // //0 != markitee_settings.ajax_add_to_cart && // markiteeModule.$body.on("submit", "form.cart", function (b) { // var c = a(this), // d = c.parents(".single-product-page"); // //if (0 === d.length && (d = c.parents(".product-quick-view")), // // !(d.hasClass("product-type-external") || // // d.hasClass("product-type-zakeke") || // // d.hasClass("product-type-gift-card"))) { // b.preventDefault(); // var e = c.find(".single_add_to_cart_button"), // f = c.serialize(); // //console.log(c); // var action = "add_to_cart"; // if (e.hasClass("remove_from_cart")) { // action = "remove_from_cart"; // f += "&action=remove_from_cart"; // } else { // f += "&action=add_to_cart"; // } // e.val() // && (f += "&add-to-cart=" + e.val()), // e.removeClass("added not-added"), // e.addClass("loading"), // a.ajax({ // url: "/cart/saveCartProduct", // data: { // product_id: e.data("product_id"), // product_sku: e.data("product_sku"), // quantity: a("#quantity_619ca9d5ca31e").val(), // action: action // }, // method: "POST", // success: function (t) { // var _obj = []; // _obj = JSON.parse(JSON.stringify(t.CartList)); // var cartCount = 0; // if (_obj.length > 0) { // e.text('In Cart'); // var items = ``); // a('.shopping-cart-widget-footer').html(` //

// Subtotal: `+ t.TOTAL + `جنيه

//

View cartشراء

// `); // var cartCountList = document.getElementsByClassName("wd-cart-number"); // for (var i = 0; i < cartCountList.length; i++) { // a(cartCountList).html(cartCount + 1); // } // var cartTotalList = document.getElementsByClassName("markitee-cart-totals"); // for (var i = 0; i < cartTotalList.length; i++) { // a(cartTotalList).html(t.TOTAL + " جنيه"); // } // cartTotal(a, t.TOTAL); // a.magnificPopup.close(); // if (action == "remove_from_cart") { // e.removeClass("remove_from_cart"); // } else { // e.addClass("remove_from_cart"); // } // e.removeClass("loading"); // // markiteeModule.$body.trigger("adding_to_cart", [e, f]); // } // else { // if (action == "remove_from_cart") { // e.removeClass("remove_from_cart"); // } else { // e.addClass("remove_from_cart"); // } // e.removeClass("loading"); // var emptyState = `
//

No products in the cart.

// // Return To Shop // //
`; // e.text('أضف لسلة المشتريات'); // a('.shopping-cart-widget-body .wd-scroll-content').html(emptyState); // a(document.body).trigger("removed_from_cart", [t.fragments, t.cart_hash, a]) // a('.shopping-cart-widget-footer').html(''); // var cartCountList = document.getElementsByClassName("wd-cart-number"); // for (var i = 0; i < cartCountList.length; i++) { // a(cartCountList).html(0); // } // var cartTotalList = document.getElementsByClassName("markitee-cart-totals"); // for (var i = 0; i < cartTotalList.length; i++) { // a(cartTotalList).html("0 جنيه"); // } // cartTotal(a, 0); // } // }, // error: function () { console.log("ajax adding to cart error") }, // complete: function () { // } // }) // // } // }) // }, a(document).ready(function () { markiteeModule.addToCartAllTypes222() }) //}(jQuery); //!function (a) { // markiteeModule.addToCartAllTypes = function () { // 0 != markitee_settings.ajax_add_to_cart // && markiteeModule.$body.on("submit", // "form.cart", function (b) { // //alert('oooo0'); // var c = a(this), d = c.parents(".single-product-page"); // if (0 === d.length // && (d = c.parents(".product-quick-view")), // !(d.hasClass("product-type-external") || // d.hasClass("product-type-zakeke") || // d.hasClass("product-type-gift-card"))) { // b.preventDefault(); // var e = c.find(".single_add_to_cart_button"), // f = c.serialize(); // f += "&action=woodmart_ajax_add_to_cart", e.val() // && (f += "&addtocart=" + e.val()), // e.removeClass("added not-added"), // e.addClass("loading"), // markiteeModule.$body.trigger("adding_to_cart", [e, f]), // a.ajax({ // // url: markitee_settings.ajaxurl, // url: "/cart/saveCartProduct", // data: { product_id: c.data("product_id"), product_sku: c.data("product_sku"), action: "adding_to_cart" }, // //data: f, // method: "POST", // success: function (b) { // //alert('hiiii'); // //if (b) { // // if (window.location.toString().replace("add-to-cart", // // "added-to-cart"), b.error && b.product_url) // // return void (window.location = b.product_url); // // if ("yes" === markitee_settings.cart_redirect_after_add) // // window.location = markitee_settings.cart_url; // // else { // // e.removeClass("loading"); // // var c = b.fragments, d = b.cart_hash; // // c && a.each(c, // // function (b) { a(b).addClass("updating") }), // // c && a.each(c, function (b, c) { a(b).replaceWith(c) }); // // var f = a(".woocommerce-notices-wrapper"); // // f.empty(), // // b.notices.indexOf("error") > 0 ? (f.append(b.notices), // // e.addClass("not-added")) : // // ("widget" === markitee_settings.add_to_cart_action // // && a.magnificPopup.close(), e.addClass("added"), // // markiteeModule.$body.trigger("added_to_cart", [c, d, e])) // // } // //} // }, // error: function () { console.log("ajax adding to cart error") }, // complete: function () { // //alert('hiiiiFail'); // } // }) // } // }) // }, a(document).ready(function () { markiteeModule.addToCartAllTypes() }) //}(jQuery); //!function (a) { // markiteeModule.addToCartAllTypes = function () { // 0 != markitee_settings.ajax_add_to_cart // && markiteeModule.$body.on("submit", "form.cart", // function (b) { // var c = a(this), // d = c.parents(".single-product-page"); // //if (0 === d.length && (d = c.parents(".product-quick-view")), // // !(d.hasClass("product-type-external") || // // d.hasClass("product-type-zakeke") || // // d.hasClass("product-type-gift-card"))) { // b.preventDefault(); // var e = c.find(".single_add_to_cart_button"), // f = c.serialize(); // f += "&action=woodmart_ajax_add_to_cart", e.val() // && (f += "&addtocart=" + e.val()), // e.removeClass("added not-added"), e.addClass("loading"), // markiteeModule.$body.trigger("adding_to_cart", [e, f]), // a.ajax({ // //url: markitee_settings.ajaxurl, // url: "/cart/saveCartProduct", // data: { product_id: e.data("product_id"), quantity: a("#quantity_61980784827ef").val(), product_sku: e.data("product_sku"), action: "adding_to_cart" }, // //data: f, // method: "POST", // success: function (b) { // // alert('hiiii0'); // var items = ``); // a('.shopping-cart-widget-footer').html(` //

// المبلغ: `+ b.TOTAL + `جنيه

//

اظهار السلةشراء

//`); // var cartCountList = document.getElementsByClassName("wd-cart-number"); // for (var i = 0; i < cartCountList.length; i++) { // a(cartCountList).html(cartCount + 1); // } // var cartTotalList = document.getElementsByClassName("markitee-cart-totals"); // for (var i = 0; i < cartTotalList.length; i++) { // a(cartTotalList).html(b.TOTAL + " جنيه"); // } // cartTotal(a, b.TOTAL); // a.magnificPopup.close(); // e.addClass("added"); // markiteeModule.$body.trigger("added_to_cart", [c, d, e]); // }, // error: function () { console.log("ajax adding to cart error") }, // complete: function () { // } // }) // // } // }) // }, a(document).ready(function () { markiteeModule.addToCartAllTypes() }) //}(jQuery); function cartTotal(d, total, offerfound, quantity) { if (total == 0) { d("#cartContainer").html(`

لايوجد منتجات فى السلة حاليا

قبل الشراء يجب وضع بعض المنتجات فى السلة أولا.
يمكنك التسوق من العديد من المنتجات المميزة فى المتجر .

العودة للتسوق

`); } d("#cartSubTotal").html(total + " جنيه"); if (offerfound == "freeShipping" && total >= 500) { shipping = "free"; d("#totalShipping").html("مجانا"); d("#totalWithShipping").html(total + "جنيه"); } else if (total <500) { d("#totalShipping").html("50.00 جنيه"); d("#totalWithShipping").html((total + 50) +"جنيه"); } else { shipping = "free"; d("#totalShipping").html("مجانا"); d("#totalWithShipping").html(total + "جنيه"); } }