vendredi 31 juillet 2015

Depending selects in symfony2

I have two selects, where the user chooses the first product to carry, and I want you automatically in the second quantities of the product that can be loaded. Examples: If you choose dishes , it can lead to a 6, 12 or 24 dishes. However , if you choose glasses , it can take one of a 5 or a 10. I'm working on Symfony2 and have an entity called Categories , which has 1 field ' category ' , and a ratio of 1 to many with another entity having the amounts by which the products of that category ( of 6 , 12, 24 ) are sold . and then I have a relationship of one to many with the entity 'Products' where all the products in each category . I'm told you do with AJAX, but nevertheless not how. Someone can give me a hand?

Aucun commentaire:

Enregistrer un commentaire