diff --git a/startbootstrap-agency-gh-pages/index.php b/startbootstrap-agency-gh-pages/index.php index 82db46577d458e1459efa331f3df03dcdb52f455..d115393a2ce6db5342e52108dac9fe32aae811c1 100644 --- a/startbootstrap-agency-gh-pages/index.php +++ b/startbootstrap-agency-gh-pages/index.php @@ -329,7 +329,6 @@ echo "Hello Mr./Ms. ".explode('@',$_SESSION["username"])[0].", you were last onl <p><?php echo $articles[$i]["description"]; ?></p> <p><?php echo "Price: ".$articles[$i]["price"]." € <br>Quantity available: ".$articles[$i]["quantity"];?></p> <div class="quantity"> - <button class="remove-button" onclick="removeProduct(this)">X</button> <button onclick="decrementQuantity(this)">-</button> <input type="text" value="1" <?php echo 'id="quantity"'.$i; ?>> <button onclick="incrementQuantity(this)">+</button> @@ -337,12 +336,7 @@ echo "Hello Mr./Ms. ".explode('@',$_SESSION["username"])[0].", you were last onl <button class="btn btn-primary btn-xl text-uppercase" type="button" <?php echo 'id = "buttonShoppingCart'.$i.'"';?>> Add to shopping cart </button> - <div class="quantity"> - - <button onclick="decrementQuantity(this)">-</button> - <input type="text" value="1" id="quantity1" readonly> - <button onclick="incrementQuantity(this)">+</button> - </div> + <script> function incrementQuantity(button) { var input = button.parentNode.querySelector('input');