Hi Everyone,
I am trying to design an AJAX powered Ordering system and am hitting a
few brick walls, and I am quite sure that Cake is able to do all this
but I am not quite sure how.
My questions are:
- Give my order have many order lines how can do a join with my supply
table to get the product names, I am not sure doing multiple gets of
names from the supply controller is the right thing to do
- Since OrderLine is contained by Order, can I use the Order
controller to save the OrderLine?
- Are there any such examples I can look at?
Thanks for your time.
If a print my array structure of an order this is what it looks like,
this is single level recursion only
Array
(
[Order] => Array
(
[order_id] => 23
[order_date] => 2007-01-30
[supplier_id] => 1
[practice_id] => 1
[username] => devraj
[sent] => 0
[comments] =>
)
[Practice] => Array
(
[practice_id] => 1
[trading_name] => Fake Medical Practice
[practice_name] => Something
[abn] => 1234
[address] => 123 fake street
[town] => fakesville
[state] => n/a
[post_code] => 2650
[medical_contact] => [EMAIL PROTECTED]
[administration_contact] => [EMAIL PROTECTED]
[guarantor_id] =>
[phone_work] => 454545445
[fax] =>
[web_url] =>
[active] => 0
)
[User] => Array
(
[username] => devraj
[password] => password
[first_name] => Devraj
[last_name] => Mukherjee
[email] => [EMAIL PROTECTED]
[administrator] => 1
[address] => 2 Bedervale St
[town] => WAGGA WAGGA
[state] => NSW
[post_code] => 2650
[phone_office] => 02-69255866
[phone_work] =>
[mobile] => 0438730499
[fax] =>
[created] => 2007-01-15 09:55:15
[modified] => 2007-01-29 10:54:43
)
[Supplier] => Array
(
[supplier_id] => 1
[name] => Default Supplier
[address] => 70 Coleman St
[town] => WAGGA WAGGA
[state] => NSW
[post_code] => 2650
[phone_work] => 69696969
[mobile] =>
[fax] =>
[email] => [EMAIL PROTECTED]
[web_url] =>
[active] => 0
[created] => 0000-00-00 00:00:00
[modified] => 2007-01-29 11:11:21
[representative_name] =>
)
[OrderLine] => Array
(
[0] => Array
(
[order_id] => 23
[supply_id] => 1
[quantity] => 20
[price] => 80.00
[order_line_id] => 1
)
)
)
--
"I never look back darling, it distracts from the now", Edna Mode (The
Incredibles)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---