I
I
Ivan Solovyov2018-02-01 12:24:25
JavaScript
Ivan Solovyov, 2018-02-01 12:24:25

How to properly send goods via Ajax?

5a72d9226f976753309781.jpeg

Good afternoon.
There is a product card, you need to send ajax data depending on the selected radio. PHP-shnik inserts
data into data by the template engine, and they are sent to the server by ajax on click. You need to somehow show which particular option of this product is selected.
I think, depending on the selected option, add the prefix "-1" or "-2" to the item number.
How to implement it correctly?
The goods are different, just the text is the same in the picture.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
Pavel Tuzov, 2018-02-01
@PavelTuzov

If the products are different, then each of them has its own unique identifier, right? If I understood the question correctly, then it is required to differentiate these products on the backend, and a unique identifier sent from the front corresponding to the product will perfectly cope with this.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question