[ Avaa Bypassed ]




Upload:

Command:

hmhc3928@3.144.242.149: ~ $
jQuery(function($) {
   "use strict";
   if (typeof wc_add_to_cart_params === 'undefined'){ return false; }

   $(document).on('click', '.add_to_cart_button', function(){
      var $thisbutton = $(this);
      if ($thisbutton.is('.product_type_simple')){
         if (! $thisbutton.attr('data-product_id')){ return true; }
         $thisbutton.removeClass('added');
         $thisbutton.addClass('loading');
         var data = {};

         $.each($thisbutton.data(), function(key, value) {
            data[key] = value;
         });

         $(document.body).trigger('adding_to_cart', [$thisbutton, data]);

         $.post(wc_add_to_cart_params.wc_ajax_url.toString().replace('%%endpoint%%', 'add_to_cart'), data, function(response){
            if (!response){ return; }
            var this_page = window.location.toString();
            this_page = this_page.replace('add-to-cart', 'added-to-cart');
            
            if(response.error && response.product_url){
               window.location = response.product_url;
               return;
            }

            if(wc_add_to_cart_params.cart_redirect_after_add === 'yes'){
               window.location = wc_add_to_cart_params.cart_url;
               return;
            }else{
               $thisbutton.removeClass('loading');
               var fragments = response.fragments;
               var cart_hash = response.cart_hash;
               if (fragments) {
                  $.each(fragments, function(key) {
                     $(key).addClass('updating');
                  });
               }
               $thisbutton.addClass('added');
               setTimeout(function(){
                  $('.mini-cart-header .mini-cart-inner').addClass('open');
               }, 1000);    
               if (!wc_add_to_cart_params.is_cart && $thisbutton.parent().find('.added_to_cart').size() === 0){
                  $thisbutton.after(' <a href="' + wc_add_to_cart_params.cart_url + '" class="added_to_cart wc-forward" title="' + wc_add_to_cart_params.i18n_view_cart + '">' + wc_add_to_cart_params.i18n_view_cart + '</a>');
               }
               if (fragments) {
                  $.each(fragments, function(key, value) {
                     $(key).replaceWith(value);
                  });
               }
               $('.shop_table.cart').load(this_page + ' .shop_table.cart:eq(0) > *', function() {
                  $('.shop_table.cart').stop(true).css('opacity', '1').unblock();
                  $(document.body).trigger('cart_page_refreshed');
               });
               $(document.body).trigger('added_to_cart', [ fragments, cart_hash, $thisbutton ]);
            }
         });
         
         return false;
      }
      return true;
   });
});

Filemanager

Name Type Size Permission Actions
magnific Folder 0755
owl-carousel Folder 0755
scroll Folder 0755
select2 Folder 0755
add-to-cart.js File 2.76 KB 0644
bootstrap.min.js File 47.76 KB 0644
jquery.appear.js File 3.26 KB 0644
jquery.cookie.js File 3.07 KB 0644
main.js File 19.11 KB 0644
notify.min.js File 13.46 KB 0644
perfect-scrollbar.jquery.min.js File 24.53 KB 0644
smooth-scroll.js File 22.42 KB 0644
sticky.js File 1.63 KB 0644
woocommerce.js File 444 B 0644