R
R
Ruslan2014-06-01 12:55:23
PHP
Ruslan, 2014-06-01 12:55:23

How to organize automatic rendering on the cart page?

Hello.
I am developing an online store for a private entrepreneur who sells goods for outdoor activities. When placing an order, being on the basket page, changing the quantity of goods, the amount does not automatically change, but only after pressing the button for recalculation. To change the quantity of goods, I use the input field.
In terms of usability, which is better, manually enter the quantity in the input field ( with respect to Artemy ) or use the - and + buttons to change the quantity, like here ?
And what is the best way to do automatic calculation?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Maxim E, 2014-06-01
@creativeworm

It will most likely be wise to use jQuery.
We "hang" events for changing the input field or clicking on - or +.
for example

$('<класс плюса и минуса>').click(function () { <отправляем данные ajax-ом, получаем и пишем в итого> });

M
Maxim Timofeev, 2014-06-01
@webinar

buttons + and - are suitable only if the theoretically possible number is not more than 5-10 pieces. And if there are goods that can be bought in 30 or 100 pieces, then the + and - keys will be regarded by the user as a mockery.
Therefore, it is most correct to make an input in which, using jQuery, to catch changes and recalculate.
Or the "change qty" button, when clicked, a popup will appear with an input and an "OK" button.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question