Help plz, there is a script receiving the value (and to check it output to the console) and the button on which the value hangs click on the link when clicked. It is required to pass the variable to the link:
<script> function qty() { var q = document.getElementById('qty').getAttribute('aria-valuenow'); console.log(q); } </script> Button next:
<button type="button" onclick="window.location.href='/cart/create?id=2&q='ВОТ ТУТ ПЕРЕМЕННАЯ" class="qwe"></button>
the point is that when a person presses a spinner (and increases the number that falls into the variable) and then presses the button, the button transfers the number to the controller (which is the q variable).
location.href='/cart/create?id=2&q='+qty(), andreturn q;in the function not to forget ... - vp_arth