GX-Bug #67089 » overwrite_cart_in_the_session_so_it_has_the_correct_quantity.patch
src/GXMainComponents/Application.inc.php (date 1592227671485) | ||
---|---|---|
1101 | 1101 |
if (!is_object($_SESSION['cart'])) { |
1102 | 1102 |
$_SESSION['cart'] = new shoppingCart(); |
1103 | 1103 |
} |
1104 |
|
|
1105 |
if (isset($_POST['cart_quantity'], $_POST['old_qty'], $_SESSION['cart']->contents[$_POST['products_id'][0]]['qty']) |
|
1106 |
&& $_POST['old_qty'][0] === $_SESSION['cart']->contents[$_POST['products_id'][0]]['qty'] |
|
1107 |
&& $_POST['old_qty'][0] !== $_POST['cart_quantity'][0]) { |
|
1108 |
$_SESSION['cart']->contents[$_POST['products_id'][0]]['qty'] = $_POST['cart_quantity'][0]; |
|
1109 |
$_SESSION['actual_content'][$_POST['products_id'][0]]['qty'] = $_POST['cart_quantity'][0]; |
|
1110 |
} |
|
1104 | 1111 |
|
1105 | 1112 |
$_SESSION['cart']->cleanup(); |
1106 | 1113 |
|