CATEGORIES See All >

Welcome

var qoute_add = "Product Added successfully View"; var base_url = "https://www.zillionsbuyer.com/"; var product_added = "Product Added To Cart View"; var added_to_cart = "Added To Cart"; var quantity_exceeds = "Product Quantity Exceed Availability!"; var product_already = "Product Already Added To Cart!"; var wishlist_add = "Product Added To Wishlist"; var wishlist_add1 = "Wished"; var wishlist_adding = "Wishing.."; var wishlist_remove = "Product Removed From Wishlist"; var compare_add = "Product Added To Compared"; var compare_add1 = "Compared"; var compare_adding = "Working.."; var compare_remove = "Product Removed From Compare"; var compare_cat_full = "Compare Category Full"; var compare_already = "Product Already Added To Compare"; var rated_success = "Product Rated Successfully"; var rated_fail = "Product Rating Failed"; var rated_already = "You Already Rated This Product"; var working = "Working.."; var subscribe_already = "You Already Subscribed"; var subscribe_success = "You Subscribed Successfully"; var subscribe_sess = "You Already Subscribed Thrice From This Browser"; var logging = "Logging In.."; var login_success = "You Logged In Successfully"; var login_fail = "Login Failed! Try Again!"; var logup_success = "You Have Registered Successfully"; var logup_fail = "Registration Failed! Try Again!"; var logging = "Logging In.."; var submitting = "Submitting.."; var email_sent = "Email Sent Successfully"; var email_noex = "Email Does Not Exist!"; var email_fail = "Email Sending Failed!"; var logging = "Logging In"; var cart_adding = "Adding To Cart.."; var cart_product_removed = "Product Removed From Cart"; var required = "The Field Is Required"; var mbn = "Must Be A Number"; var mbe = "Must Be A Valid Email Address"; var valid_email = "Enter A Valid Email Address"; var applying = "Applying.."; var coupon_not_valid = "Coupon Not Valid"; var coupon_discount_successful = "Coupon Discount Successful"; var currency = " ₹"; var exchange = Number(1); var min_order_qty = 'Please Add more Qauntity'; var $j = jQuery.noConflict(); var $ = jQuery.noConflict(); var qitems = []; function product_listing_defaults(){ reload_header_cart(); $j('.ajax-to-cart').click(function(e){ e.preventDefault(); var product = $(this).data('pid'); var elm_type = $(this).data('type'); var button = $(this); var alread = button.html(); var type = 'pp'; if(button.closest('.row').find('.cart_quantity').length){ quantity = button.closest('.margin-bottom-40').find('.cart_quantity').val(); } if($('#pnopoi').length){ type = 'pp'; var form = button.closest('form'); var formdata = false; if (window.FormData){ formdata = new FormData(form[0]); } var option = formdata ? formdata : form.serialize(); } else { type = 'other'; var form = $('#cart_form_singl'); var formdata = false; if (window.FormData){ formdata = new FormData(form[0]); } var option = formdata ? formdata : form.serialize(); } $.ajax({ url : base_url+'home/cart/add/'+product+'/'+type, type : 'POST', // form submit method get/post dataType : 'html', // request type html/json/xml data : option, // serialize form data cache : false, contentType : false, processData : false, beforeSend: function() { if(elm_type !== 'icon'){ $j(this).addClass('btn--wait'); } }, success: function(data) { $j('.ajax-to-cart').removeClass('btn--wait'); if(data == 'added'){ $('.add_to_cart').each(function(index, element) { if( $('body .add_to_cart').length ){ $('body .add_to_cart').each(function() { if($(this).data('pid') == product){ var h = $(this); if(h.data('type') == 'text'){ h.html(''+added_to_cart).fadeIn(); } else if(h.data('type') == 'icon'){ h.html('').fadeIn(); } } }); } }); reload_header_cart(); //growl //ajax_load(base_url+'home/cart/added_list/','added_list'); notify(product_added,'success','bottom','center'); //sound('successful_cart'); } else if (data == 'shortage'){ //button.html(alread); notify(quantity_exceeds,'warning','bottom','center'); //sound('cart_shortage'); } else if (data == 'already'){ //button.html(alread); notify(product_already,'warning','bottom','center'); //sound('already_cart'); } }, error: function(e) { console.log(e) } }); }); $j('.ajax-to-wishlist').click(function(e){ e.preventDefault(); //$j('#modalAddToWishlist').modal("toggle"); //$j('#modalAddToWishlist .loading').show(); //$j('#modalAddToWishlist .success').hide(); var state = check_login_stat('state'); var product = $(this).data('pid'); var button = $(this); state.success(function (data) { if(data == 'hypass'){ $.ajax({ url: base_url+'home/wishlist/add/'+product, beforeSend: function() { }, success: function(data) { if(data == ''){ //$j('#modalAddToWishlist .loading').hide(); //$j('#modalAddToWishlist .success').show(); notify(wishlist_add,'info','bottom','right'); } else { notify(wishlist_already,'warning','bottom','right'); } }, error: function(e) { console.log(e) } }); } else { //$j('#modalAddToWishlist .loading').hide(); //$j('#modalAddToWishlist').modal("toggle"); signin(); } }); }); } function reload_header_cart(){ $.getJSON(base_url+"home/cart/whole_list", function(result){ var total = 0; var whole_list = ''; var count = Object.keys(result).length; if(count==0) { whole_list="

shopping cart empty

"; } $.each(result, function(i, field){ total += Number(field['subtotal'])*exchange; /* whole_list += "
" +" \"\"" +"
" +"

"+field['name']+"

" +"
" +"

"+currency+(Number(field['price'])*exchange*Number(field['qty'])).toFixed(2)+"X"+field['qty']+"

" +"
"; */ whole_list += "
" +" " +"
" +"
" +" "+field['name']+" "+field['qty']+" X "+currency+field['price']+"" +"
" +"
" +"
" +"
" }); $('.cart_num').html(count); $('.header__cart__indicator').html(currency+total.toFixed(2)); $('.shopping-cart__top').html('Your Cart('+count+')'); $('.top_carted_list').html(whole_list); $('.shopping-cart__total').html(currency+total.toFixed(2)); }); }