I didn't follow all that but I see Package.name right above short_description.

On Mon, Apr 16, 2012 at 1:15 PM, Fábio <[email protected]> wrote:
> I'm currently developing a multilanguage travel agency website and I
> have this :
> -----------------------------------------------------
> Itinerary hasmany ItineraryPackage
> Package hasmany ItineraryPackage
>
> ItineraryPackage belongsto Package
> ItineraryPackage belongsto Itinerary
> ----------------------------------------------------
> also there are adicional relations that are not related to the
> problem, that are:
> Package hasmany PackageImage
> Package hasmany PackagePrice
>
> I was using HABTM relation between itinerary and package, but i've
> decided to add extra data to the itinerary_package relation, that is
> "description". Its a description of the itinerary in that package.
> Each itinerary can have a different description depending on the
> package.
>
> I'm new to cakephp and this is my second project. After many hours
> fighting with cakephp to build the relations, i ended up making the
> insert/update/delete part, but the problem is displaying data in the
> frontend.
>
> I wanna show a list of packages, and the itineraries that the package
> goes to. After clicking in the list item, the user is redirected to
> the details page, where it will be able to see the package details and
> also the itineraries that this package attends and the description of
> each itinerary in that package.
>
> The problem is, i can get the information of the packages in the list,
> and the value of itinerary_packages, but i cant get the name of the
> package. Its not joining the table itinerary with the value returned
> from itinerary_packages
>
> Array
> (
>    [0] => Array
>        (
>            [Package] => Array
>                (
>                    [id] => 1
>                    [package_type_id] => 1
>                    [name] => teste
>                    [short_description] => teste teste teste teste
> teste teste teste teste teste teste teste teste teste teste teste
> teste teste teste teste teste teste teste teste teste teste teste
>                    [description] => teste teste teste teste teste
> teste teste teste teste teste teste teste teste teste teste teste
> teste teste teste teste teste teste teste teste teste teste
>                    [image_url] =>
> 2012-04-13-202341_carnaval_salvador.jpg
>                    [video_url] =>
>                    [title] =>
>                    [departure_date] => 2012-04-13 20:22:00
>                    [return_date] => 2012-04-13 20:22:00
>                    [available] => 1
>                    [featured] => 1
>                    [created] => 2012-04-13 20:23:42
>                    [modified] => 2012-04-16 16:47:14
>                    [locale] => pt_br
>                )
>
>            [PackageType] => Array
>                (
>                    [id] => 1
>                    [name] => Nacional
>                    [title] => Nacional
>                    [created] => 2012-04-12 18:12:59
>                    [modified] => 2012-04-12 18:12:59
>                )
>
>            [PackageImage] => Array
>                (
>                    [0] => Array
>                        (
>                            [id] => 1
>                            [package_id] => 1
>                            [image_url] => Chrysanthemum.jpg
>                            [created] => 2012-04-10 14:08:22
>                            [modified] => 2012-04-10 14:08:22
>                        )
>
>                    [1] => Array
>                        (
>                            [id] => 2
>                            [package_id] => 1
>                            [image_url] => Desert.jpg
>                            [created] => 2012-04-10 14:08:22
>                            [modified] => 2012-04-10 14:08:22
>                        )
>
>                    [2] => Array
>                        (
>                            [id] => 3
>                            [package_id] => 1
>                            [image_url] => Hydrangeas.jpg
>                            [created] => 2012-04-10 14:08:22
>                            [modified] => 2012-04-10 14:08:22
>                        )
>
>                    [3] => Array
>                        (
>                            [id] => 133
>                            [package_id] => 1
>                            [image_url] => Chrysanthemum.jpg
>                            [created] => 2012-04-11 20:14:49
>                            [modified] => 2012-04-11 20:14:49
>                        )
>
>                    [4] => Array
>                        (
>                            [id] => 255
>                            [package_id] => 1
>                            [image_url] => Chrysanthemum.jpg
>                            [created] => 2012-04-13 20:23:43
>                            [modified] => 2012-04-13 20:23:43
>                        )
>
>                    [5] => Array
>                        (
>                            [id] => 256
>                            [package_id] => 1
>                            [image_url] => Lighthouse.jpg
>                            [created] => 2012-04-13 20:23:43
>                            [modified] => 2012-04-13 20:23:43
>                        )
>
>                    [6] => Array
>                        (
>                            [id] => 257
>                            [package_id] => 1
>                            [image_url] => Koala.jpg
>                            [created] => 2012-04-13 20:23:43
>                            [modified] => 2012-04-13 20:23:43
>                        )
>
>                    [7] => Array
>                        (
>                            [id] => 258
>                            [package_id] => 1
>                            [image_url] => Jellyfish.jpg
>                            [created] => 2012-04-13 20:23:44
>                            [modified] => 2012-04-13 20:23:44
>                        )
>
>                )
>
>            [PackagePrice] => Array
>                (
>                )
>
>            [ItineraryPackage] => Array
>                (
>                    [0] => Array
>                        (
>                            [id] => 6
>                            [package_id] => 1
>                            [itinerary_id] => 4
>                            [description] => teste
>                            [order] => 0
>                        )
>
>                    [1] => Array
>                        (
>                            [id] => 7
>                            [package_id] => 1
>                            [itinerary_id] => 7
>                            [description] => teste
>                            [order] => 0
>                        )
>
>                )
>
>            [nameTranslation] => Array
>                (
>                    [0] => Array
>                        (
>                            [id] => 226
>                            [locale] => pt_br
>                            [model] => Package
>                            [foreign_key] => 1
>                            [field] => name
>                            [content] => teste
>                        )
>
>                    [1] => Array
>                        (
>                            [id] => 227
>                            [locale] => en_us
>                            [model] => Package
>                            [foreign_key] => 1
>                            [field] => name
>                            [content] => teste
>                        )
>
>                    [2] => Array
>                        (
>                            [id] => 228
>                            [locale] => es_es
>                            [model] => Package
>                            [foreign_key] => 1
>                            [field] => name
>                            [content] => teste
>                        )
>
>                )
>
>            [short_descriptionTranslation] => Array
>                (
>                    [0] => Array
>                        (
>                            [id] => 229
>                            [locale] => pt_br
>                            [model] => Package
>                            [foreign_key] => 1
>                            [field] => short_description
>                            [content] => teste teste teste teste teste
> teste teste teste teste teste teste teste teste teste teste teste
> teste teste teste teste teste teste teste teste teste teste
>                        )
>
>                    [1] => Array
>                        (
>                            [id] => 230
>                            [locale] => en_us
>                            [model] => Package
>                            [foreign_key] => 1
>                            [field] => short_description
>                            [content] => teste teste teste teste teste
> teste teste teste teste teste teste teste teste teste teste teste
> teste teste teste teste teste teste teste teste teste teste
>                        )
>
>                    [2] => Array
>                        (
>                            [id] => 231
>                            [locale] => es_es
>                            [model] => Package
>                            [foreign_key] => 1
>                            [field] => short_description
>                            [content] => teste teste teste teste teste
> teste teste teste teste teste teste teste teste teste teste teste
> teste teste teste teste teste teste teste teste teste teste
>                        )
>
>                )
>
>            [descriptionTranslation] => Array
>                (
>                    [0] => Array
>                        (
>                            [id] => 232
>                            [locale] => pt_br
>                            [model] => Package
>                            [foreign_key] => 1
>                            [field] => description
>                            [content] => teste teste teste teste teste
> teste teste teste teste teste teste teste teste teste teste teste
> teste teste teste teste teste teste teste teste teste teste
>                        )
>
>                    [1] => Array
>                        (
>                            [id] => 233
>                            [locale] => en_us
>                            [model] => Package
>                            [foreign_key] => 1
>                            [field] => description
>                            [content] => teste teste teste teste teste
> teste teste teste teste teste teste teste teste teste teste teste
> teste teste teste teste teste teste teste teste teste teste
>                        )
>
>                    [2] => Array
>                        (
>                            [id] => 234
>                            [locale] => es_es
>                            [model] => Package
>                            [foreign_key] => 1
>                            [field] => description
>                            [content] => teste teste teste teste teste
> teste teste teste teste teste teste teste teste teste teste teste
> teste teste teste teste teste teste teste teste teste teste
>                        )
>
>                )
>
>            [titleTranslation] => Array
>                (
>                    [0] => Array
>                        (
>                            [id] => 235
>                            [locale] => pt_br
>                            [model] => Package
>                            [foreign_key] => 1
>                            [field] => title
>                            [content] =>
>                        )
>
>                    [1] => Array
>                        (
>                            [id] => 236
>                            [locale] => en_us
>                            [model] => Package
>                            [foreign_key] => 1
>                            [field] => title
>                            [content] =>
>                        )
>
>                    [2] => Array
>                        (
>                            [id] => 237
>                            [locale] => es_es
>                            [model] => Package
>                            [foreign_key] => 1
>                            [field] => title
>                            [content] =>
>                        )
>
>                )
>
>        )
>
> --
> Our newest site for the community: CakePHP Video Tutorials 
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help 
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> [email protected] For more options, visit this group at 
> http://groups.google.com/group/cake-php

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to