Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(isset($_POST['update'])){
- foreach($_POST['book'] as $book_id => $amount){
- $amount = intval($amount);
- if($amount <= 0){
- $cart->remove($book_id);
- // echo "REMOVING BOOK";
- } else {
- $cart->update($book_id,"amount",$amount);
- // echo "UPDATING BOOK WITH AMOUNT: ".$amount;
- }
- }
- $cart->save();
- }
Add Comment
Please, Sign In to add comment