Advertisement
Guest User

Untitled

a guest
Feb 23rd, 2019
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.51 KB | None | 0 0
  1. <div class="dec qtybutton ">-</div>
  2. <input type="text" value="<?php echo $values['qty'];?>" name="qty[]" id="qty" class="qty minhaj_update test">
  3. <div class="inc qtybutton " >+</div>
  4. </div></span>
  5. </td>
  6. <td class=" product-subtotal"><span class="money" data-currency-usd="<?php echo $values['subtotal'];?>"><?php echo $values['subtotal'];?></span></td>
  7. <td class=" product-remove cartrmove" data-id="<?php echo $values['rowid']?>"><a href="javascript:void(0);" ><i class="fa fa-times" aria-hidden="true" ></i></a></td>
  8. </tr>
  9. <?php $i++; } ;?>
  10. </tbody>
  11. </table>
  12. </div>
  13. <div class="row table-responsive_bottom">
  14. <div class="col-lg-7 col-sm-7 col-md-7">
  15. <div class="buttons-carts">
  16. <input class="theme-default-button" type="submit" value="Update Cart">
  17. <a href="<?=base_url();?>">Continue Shopping</a>
  18. </div></form>`
  19.  
  20. public function update_cartpage()
  21. {
  22.  
  23.  
  24. $roids=$this->input->post('rowid',true);
  25. $gty=$this->input->post('qty',true);
  26.  
  27.  
  28. if (!empty($roids)) {
  29.  
  30. $data = array(
  31. 'rowid' => $roids,
  32. 'qty' => $gty
  33. );
  34.  
  35.  
  36. /* print_r($data);
  37. exit; */
  38. $this->cart->update($data);
  39. } else{
  40. echo "sorry";
  41. exit;
  42. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement