need to do so that in the basket when adding an order, the text "place order" was a link leading to the page for example basket.php.
$(document).ready(function() { $('.header__menu a i').click(function() { $('.sub-menu').toggle() }) //тут кол-во товара $('.add-tovar').click(function() { var count = parseInt($("#tovar").text()) + 1; $("#tovar").text(count); if (count > 0) { $("#kol").text("оформить заказ"); } }); //тут должна прибавляться цена товара $('.add-tovar').click(function() { // Get total var total = $('#cena').attr('data-total-price') // Set total converting it to number total = +$(".cost", this).attr('data-price') + (+total) $('#cena').attr('data-total-price', total) //---------------------------------------------------------------- // Set price veiw $("#cena").text('$' + total); }) })