MMCT TEAM
Server IP : 162.214.80.37  /  Your IP : 216.73.216.57
Web Server : Apache
System : Linux sh013.webhostingservices.com 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64
User : imyrqtmy ( 2189)
PHP Version : 8.2.18
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0755) :  /home2/imyrqtmy/public_html/skyispatudyog/sym/Users/0-imyrqtmy/gym/js/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home2/imyrqtmy/public_html/skyispatudyog/sym/Users/0-imyrqtmy/gym/js/myjs.js
 $(document).ready(function(){



     $(document).on('click','.addtocart', function(){

            // alert('k');



            var id1 = $(this).attr('id').split('e').pop();



               var proid = $('#proid'+id1).val();

          var pprice = $('#pprice'+id1).val();

          var quantity = $('.quantity'+id1).val();

          

          

          $.ajax({  

                    type: 'POST',  

                    url: 'Ajax/addtocart.php', 

                    data: {proid: proid,pprice: pprice,quantity: quantity },

                    success: function(response) {

                          

                         if(response==1)

                           {

                            // $('#exampleModal').hide();

                            

                                toastr.success("Product has been Added In To Cart");

                                

                                setTimeout(function () {

                            

                      location.reload();

                        }, 2000);



                    //             setTimeout(function () {

                            

                    //   window.location.href='cart.php';

                    //     }, 2000);

                                // window.location.href='cart.php';

                             

                           }

                           else

                           {

                                 alert(data);

                           }

                    }

                });





});

     });

 // wishlist

  $(document).ready(function(){



     $(document).on('click','.wishlist', function(){

            // alert('k');



            var id1 = $(this).attr('id').split('e').pop();



               var proid = $('#proid'+id1).val();

          var pprice = $('#pprice'+id1).val();

          var quantity = $('.quantity'+id1).val();

          

          

          $.ajax({  

                    type: 'POST',  

                    url: 'Ajax/addwish.php', 

                    data: {proid: proid,pprice: pprice,quantity: quantity },

                    success: function(response) {

                          

                         if(response==1)

                           {

                            // $('#exampleModal').hide();

                            

                                toastr.success("Product has been Added In To Wishlist");

                                

                                setTimeout(function () {

                            

                      location.reload();

                        }, 2000);



                    //             setTimeout(function () {

                            

                    //   window.location.href='cart.php';

                    //     }, 2000);

                                // window.location.href='cart.php';

                             

                           }

                           else

                           {

                                 alert(data);

                           }

                    }

                });





});

     });
     
      $(document).ready(function(){



     $(document).on('click','.deletepro', function(){

        

        var id1 = $(this).attr('id').split('e').pop();

         $.ajax({  

                    type: 'POST',  

                    url: 'Ajax/delete_cart.php', 

                    data: {proid: id1 },

                    success: function(response) {

                          

                         if(response==1)

                           {

                            // $('#exampleModal').hide();

                            

                                toastr.success("Product has been Removed");



                                setTimeout(function () {

                            

                       window.location.href='cart.php';

                        }, 2000);

                                // window.location.href='cart.php';

                             

                           }

                           else

                           {

                                 alert(data);

                           }

                    }

                });

    });

     });

    

        $(document).ready(function(){



     $(document).on('change','.updatecart', function(){

         

         var  iqty = $(this).val();    

                 var id1 = $(this).attr('id').split('e').pop();

        

        // var aid = $(this).closest('tr').attr('id');

        

        // var price = $('#qty').val();

        

        // alert(iqty);

        // alert(id1);

        

         $.ajax({  

                    type: 'POST',  

                    url: 'Ajax/update_qty.php', 

                    data: {aid: id1,qty: iqty },

                    success: function(response) {

                          

                         if(response==1)

                          {

                            // $('#exampleModal').hide();

                            

                                toastr.success("Cart Has Been Updated");



                                setTimeout(function () {

                            

                      window.location.href='cart.php';

                        }, 2000);

                                // window.location.href='cart.php';

                             

                          }

                          else

                          {

                                 alert(data);

                          }

                    }

                });

    });

     });

MMCT - 2023