Answer the question
In order to leave comments, you need to log in
Opencart - picking one product in its card - how to do it?
Hello! Do any of you know how to create products in Opencart with the ability to select different configurations in one product card?
For example, by default, if a product is added, then it is possible to select only the quantity of this product.
And I would like to make it so that the product has the ability to choose from many configurations, and in addition - in fact, the choice of quantity.
Thus, if the item is BLABLA, then it should be able to choose a bundle from several options:
BLABLA red x quantity
BLABLA white x quantity
BLABLA green x quantity
Where "quantity" is the quantity of this bundle.
Answer the question
In order to leave comments, you need to log in
Create your own input for each option with a quantity.
Then there are 2 options:
1. Use the standard function
index.php?route=checkout/cart/add
and add all the options to the cart individually
2. Collect everything in an array: option => quantity
and write your function to add to the cart at once with an array
The second option is preferable, especially if you have a lot of options. there will be only one request per server.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question