# |
Jan 30th 2014, 19:53 |
BackEndCoder |
how would you want to add a price for each customer tho >? |
# |
Jan 30th 2014, 19:52 |
BackEndCoder |
its like one of those |
# |
Jan 30th 2014, 19:52 |
BackEndCoder |
linking the customer to the new price |
# |
Jan 30th 2014, 19:52 |
the-neon |
isn't that what the hasmany:through is for based on the book? |
# |
Jan 30th 2014, 19:52 |
BackEndCoder |
you would have an extra table |
# |
Jan 30th 2014, 19:52 |
the-neon |
but... we have an extra field for each product per customer ( price ) |
# |
Jan 30th 2014, 19:52 |
BackEndCoder |
how you wish to manage that i don't know |
# |
Jan 30th 2014, 19:51 |
BackEndCoder |
to have a seperate price per product for each customer would be a habtm assoc |
# |
Jan 30th 2014, 19:50 |
BackEndCoder |
ACTION reads the-neon's question |
# |
Jan 30th 2014, 19:50 |
todds |
I speak Portuguese and sort of understand Spanishâ?¦ It would probably frustrate you to try to have a conversation with me in Spanish. :( |
# |
Jan 30th 2014, 19:50 |
the-neon |
BackEndCoder, did you see my question earlier? Perhaps you have a clue? |
# |
Jan 30th 2014, 19:49 |
DiegoHeras |
Becuase the codebook in Spanish is squishy |
# |
Jan 30th 2014, 19:49 |
DiegoHeras |
=/ |
# |
Jan 30th 2014, 19:49 |
BackEndCoder |
chris______, debug array go go go |
# |
Jan 30th 2014, 19:49 |
the-neon |
lol |
# |
Jan 30th 2014, 19:48 |
BackEndCoder |
P |
# |
Jan 30th 2014, 19:48 |
BackEndCoder |
anyone spanish in here ? |
# |
Jan 30th 2014, 19:48 |
DiegoHeras |
Could i ask you , if you know some Spanish guy who knows about cakePhp? |
# |
Jan 30th 2014, 19:48 |
BackEndCoder |
and this line $quotation = $this->Quotation->save($this->request->data); will only return a 1 or a 0, its not what you thought it was |
# |
Jan 30th 2014, 19:48 |
DiegoHeras |
Thank you! |
# |
Jan 30th 2014, 19:47 |
BackEndCoder |
a saveAll would be for multible orders |
# |
Jan 30th 2014, 19:47 |
BackEndCoder |
you don't want to use a saveAll here, as you only have one order |
# |
Jan 30th 2014, 19:46 |
BackEndCoder |
i think you are confusing the saveAll |
# |
Jan 30th 2014, 19:46 |
BackEndCoder |
and $relationshipData |
# |
Jan 30th 2014, 19:45 |
BackEndCoder |
add to that paste with the debug output of $this->request->data |
# |
Jan 30th 2014, 19:45 |
todds |
DiegoHeras: Updated to demonstrate multi-select: http://bin.cakephp.org/view/2144345512 |
# |
Jan 30th 2014, 19:45 |
BackEndCoder |
ok |
# |
Jan 30th 2014, 19:45 |
chris______ |
http://bin.cakephp.org/view/1818424926 |
# |
Jan 30th 2014, 19:45 |
chris______ |
here is it |
# |
Jan 30th 2014, 19:43 |
BackEndCoder |
or your order will start to delete itself |
# |
Jan 30th 2014, 19:43 |
TeckniX |
1 Recipe has many ingredients |
# |
Jan 30th 2014, 19:43 |
BackEndCoder |
so its important for you, if you do an order update, to resave the whole order |
# |
Jan 30th 2014, 19:43 |
the-neon |
Time for me to ask a question because I'm not sure I'm approaching this the right away: I have Customer and Product and I want to save override Product pricing for each Customer. Should I follow a hasMany through a new model association or in a different way? |
# |
Jan 30th 2014, 19:43 |
todds |
diegoheras: http://bin.cakephp.org/view/2144345512 |
# |
Jan 30th 2014, 19:43 |
TeckniX |
chris______: you can look in the book at the Recipe + ingredients tutorial |
# |
Jan 30th 2014, 19:43 |
BackEndCoder |
but but but, it will delete anything i don't mention |
# |
Jan 30th 2014, 19:42 |
BackEndCoder |
as long as i feed the articles model with the right array, it will save my assosition |
# |
Jan 30th 2014, 19:42 |
todds |
!bin |
# |
Jan 30th 2014, 19:42 |
BackEndCoder |
in my example.. and article habtm genres |
# |
Jan 30th 2014, 19:42 |
chris______ |
btw, in my code, Orders are called Quotation; and Items are called Products |
# |
Jan 30th 2014, 19:41 |
chris______ |
ok |