Posted - 05/03/2021 : 17:57:13
Ok, so place this code in your cart.php page somewhere after the include line <?php include "vsadmin/inc/inccart.php" ?> <script> //Hide Applicable discounts line in cart if (document.getElementsByClassName("cart3details")[0]) { var cartrows = document.getElementsByClassName("cart3row"); for (i = 0; i < cartrows.length; i++) { var loccrtrow = cartrows[i].innerHTML; if (loccrtrow.includes("Discounts applicable")) { cartrows[i].style.display = "none"; }}} </script> This is my ideal solution because the cart3row class might show up in multiple lines in your cart and we don't want to hide the wrong one. This code is fairly simple. It starts by checking that you are on the 3rd page of checkout, then runs. It loops through all elements that use the cart3row class, looking for a match for the string "Discounts applicable", if found, it sets that div to not show, using css. To me, as the code is now, this is the surest way to hide the correct div. Thanks, David
Edited by - dbdave on 05/03/2021 17:59:20
|