-1
Positive added / Negative removed
([1] => 3 [6] => -2 )
Next customer can change all snack settings contains a default amount (recipe)
It can pull out 2x and can add 1x 2x 3x lettuce
in case he add 3x and withdrew 2x
then the system has to make a sub-stitution 1 steak per 1 lettuce and additional 1 lettuce, then the system has to have additional/withdrawal/replacement... in my view will always happen or replaces and adds or replaces and removes /// or just subistitui
remembering that everything dynamic can happen these possibilities several times
-+ Bacon por Alfance = R1,00
+ Alfance = R$ 0,50
-+ 2x Bacon por Alfance = R2,00
+ Alfance = R$ 0,50
here is a demonstration http://jsfiddle.net/qtx8jrLy how the client’s part of what he can do...
the ones already marked and the standard recipe of the product... that tbm can be changed...
I even managed to do
**o problema esta aki como interpretar esse array**
(
[1] => 3 // [id_produto] => quantidade
[6] => -2 // [id_produto] => quantidade
)
fazer-lo virar
-+ 2x Bacon por Alfance = R2,00
+ Alfance = R$ 0,50
**as os possivel acontecimentos para esse array**
-+ 2x Bacon por Alfance = R2,00
+ Alfance = R$ 0,50
-+ Bacon por Alfance = R1,00
- Alfance = R$ 0,50
-+ 2x Bacon por Alfance = R1,00
http://www.amburgueria.com.br/carrinhoOO/ put the system online
I don’t understand what the problem is.
– Jorge B.
how to read this array... I was unable to interpret it
– Willian
Maybe you should include a field Hidden with the total value of the products, then when adding or removing an item from the snack, you will make the management according to the "balance" of the customer. E in Array bring more information like
[id] = {[quantidade] = 3, [valor] = [2.00], [qtd_padrao] = 2}
– KaduAmaral