0
I created a shopping cart and saw the need to put a Spin Up/Down control, because I need the user to edit the value. But when I go back to the product gallery and ask for another product and buy it back to the shopping cart, everything works fine, only the edited value does not fix. What would be the solution?
what is "Spin Up/Down Control"? Where Values Come From?
– Sam
It is a type of <input with type="number". It is an arrow up and an arrow down. <td><input type="number" id="num_vit" placeholder="1" min="14" max="41">' . $numbering . ' </td>.
– xavier
Because he is a friend, when making this change in the element you need to change where this information is stored. So I asked "where do these values come from".
– Sam
It is a type of <input with type="number". It is an arrow up and an arrow down. <td><input type="number" id="num_vit" placeholder="1" min="14" max="41">' . $numbering . ' </td>. But it can be an input type= "text". After sending to the shopping cart, the customer will have the option to change the numbering. And once he sends new product to the cart, this numbering needs to be maintained. But until that time I have not recorded on the basis the order. It has to save the variable in the own cart Session and restore it in this procedure the customer will do?
– xavier
Logical, the product data comes from the database.
– xavier
You need to save it somewhere. Otherwise it’s no use changing because every time you go back to the page the value will look like it is in HTML.
– Sam
I only record the order after the customer finalize the same, enter the delivery data and finally I generate a payment slip and send to the email.
– xavier
Let’s go continue this discussion in chat.
– xavier
One way is to save to the browser itself using localStorage. Or you could create in the bank a record with the cart information and change via Ajax.
– Sam