cake-php
[Arriba] [Todas las Listas]

Re: Cómo para editar una vista en Pastel php

To: cake-php@xxxxxxxxxxxxxxxx
Subject: Re: Cómo para editar una vista en Pastel php
From: Ravinder Kaur <kaur.r87@xxxxxxxxx>
Date: Wed, 19 Jun 2013 11:33:24 -0700
Delivery-date: Wed, 19 Jun 2013 14:33:43 -0400
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20120806; h=x-beenthere:mime-version:in-reply-to:references:date:message-id :subject:from:to:x-original-sender:x-original-authentication-results :reply-to:precedence:mailing-list:list-id:x-google-group-id :list-post:list-help:list-archive:sender:list-subscribe :list-unsubscribe:content-type; bh=XpPtrcA4/tdLDGJZC1U00ElCEUleTKG43Vfa1227wLw=; b=Z/2cQy9CdlgvKiV+cdF6jdDp3yZLAsNA2uk7kR40kujZPqyFNjnclERPkQxDwDNM9l AZ/K+ffcDpigLH9lfax3Gnl0LIh4C/r+IIkbhTUDhht+Y6V+TQZcOdUx4rii8lAlPCC+ x+cf9OP2Kw7WTqWjH3R3LRTDLGzX8miy4mhSGMKzf0q7kUwwbB80ilPIpXHgb90kxiDu e4FDNLkB7I6y8LPzCcdHZYZjNrW6T0Ei91wkvjImxQNI8ykTmScMlVFEf52fExE55qUh u5+2c+d1blO8f741vaELOzkCKmGOxExWymRRMUk+j39vhjDPRiAqM28B14n9qUKptSTv zong==
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-beenthere:mime-version:in-reply-to:references:date:message-id :subject:from:to:x-original-sender:x-original-authentication-results :reply-to:precedence:mailing-list:list-id:x-google-group-id :list-post:list-help:list-archive:sender:list-subscribe :list-unsubscribe:content-type; bh=XpPtrcA4/tdLDGJZC1U00ElCEUleTKG43Vfa1227wLw=; b=LHbPRpVbvxkVFpRVjaZuTIBnkEhGNREQG2z1FlZERZ5fVeNQx1tsrMCm3EHF3HRDRf O5AqTxyfhZVA8vHWyEzHQb15QiFe4C5qSqhBvkTIKYo4nc01mUQdHglMIartNSO+83Ao p5Z78ca2hP5QJPEBEbwoCAb0llgTkSAyCpd3eznnPNJ0ABc16xmjfD3CkOkBGXocgF5y VzHMYvGEGTk945ceawkufoMvoDpfzvhk5dd/eMZLy0fBxKM9nBNcEbXsCUoUj8RE5qMI 6SjSshEF5kDMOGKK1POJ0jKKcKWw4iLMnttYqx7qHCVIA5TJcdhJRbGRyNMZrpYjyecC 23Fw==
Envelope-to: traductor@xxxxxxxxxxx
In-reply-to: <CAPPG8JBN-NA_rr-gYHGOeP=Kcmay4jaArQ2Tnnb-LoWRrouZ_A@mail.gmail.com>
List-archive: <http://groups.google.com/group/cake-php>
List-help: <http://groups.google.com/support/>, <mailto:cake-php+help@googlegroups.com>
List-id: <cake-php.googlegroups.com>
List-post: <http://groups.google.com/group/cake-php/post>, <mailto:cake-php@googlegroups.com>
List-subscribe: <http://groups.google.com/group/cake-php/subscribe>, <mailto:cake-php+subscribe@googlegroups.com>
List-unsubscribe: <http://groups.google.com/group/cake-php/subscribe>, <mailto:googlegroups-manage+1003367825667+unsubscribe@googlegroups.com>
Mailing-list: list cake-php@xxxxxxxxxxxxxxxx; contact cake-php+owners@xxxxxxxxxxxxxxxx
References: <90c3adf6-6974-4870-a6d5-02b942d2f1fa@googlegroups.com> <0f2f857e-61ed-47bc-9c11-85e96a9b5272@googlegroups.com> <CACGX8E62Fq-nne6AmC_O-9QzGhZ0MgJqV_CWSDidUS-F_OOYLw@mail.gmail.com> <CAPPG8JDTHzvgn3D-pyw5G4nELE_0+ReSQpsKjVF3BiypdThpBg@mail.gmail.com> <64eb6593-ce4f-4dda-929e-d3bba0b0532c@googlegroups.com> <CAPPG8JBN-NA_rr-gYHGOeP=Kcmay4jaArQ2Tnnb-LoWRrouZ_A@mail.gmail.com>
Reply-to: cake-php@xxxxxxxxxxxxxxxx
Sender: cake-php@xxxxxxxxxxxxxxxx
Productos de mesa tienen una llave extranjera 'el producto_familiar_*id'  y tiene pertenece a relación
con mesa_de familias del Producto.
Familias de Producto_de la mesa tienen llave extranjera 'cliente_*id' y tiene pertenece a relación
con mesa de Clientes.
Ahora Cómo puede *i conectar modelo de Producto y modelo de Cliente para tener nombre
de cliente en Vista de Producto.




En *Wed, *Jun 19, 2013 en 10:29 AM, *Ravinder *Kaur <*kaur.*r87@*xxxxxxxxx> escribió:

> Sí tengo modelo para todas mis mesas..
>
>
> En *Tue, *Jun 18, 2013 en 7:25 PM, Eric *Haskins <*ehask71@*xxxxxxxxx> escribió:
>
>>  tienes un Modelo de Clientes? Tengo modelos para todo de mis mesas
>>
>>
>>
>>
>> En lunes, junio 17, 2013 5:38:40 PM *UTC-4, *Raks escribió:
>>
>>> Regresos un código
>>>
>>> {"de Error":500,"*url":"\/los productos que\**/listan_dato.*json","nombre":"**la Llamada a una función de miembro encuentra() en un no-objeto"}
>>>
>>>
>>>
>>> En *Mon, *Jun 17, 2013 en 1:26 PM, *Gaurav *Matta <gauravg...@xxxxxxxxx>escribió:
>>>
>>>> Si sólo quieres nombre de clientes entonces puedes añadir variedad $de usos=
>>>> públicos('producto','cliente'); como *datamember en vuestra clase de controlador
>>>>
>>>> Y tú pueden utilizar $esto->cliente->encontrar('todo') en *ur la acción
>>>>
>>>> me Dejó sabe si estas ayudas
>>>> En 17-*Jun-2013 11:08 PM, "*Raks" <kaur...@xxxxxxxxx> escribió:
>>>>
>>>>>  Tiene añadió una Columna nueva... Pero *m no capaz de conseguir un dato de columna de otro
>>>>> modelo. Quiero nombre de mesa de clientes en vista de productos.*ctp.
>>>>>
>>>>> Aquí el código de vista:
>>>>> *<?*php
>>>>> $Variedad = de registros();
>>>>> *foreach ($productos como $producto)
>>>>>
>>>>>     $#nom = ($producto['Producto']['es_activo'] == '1') ? 'Habilitado' :
>>>>> 'Discapacitado';
>>>>>
>>>>>     $registros[] = variedad(
>>>>>                         'Producto.Modelo' => variedad('título' =>
>>>>> $producto['Producto']['modelo'], '*id' => $producto['Producto']['*id']),
>>>>>                         'Producto.Parte_*num' =>
>>>>> $producto['Producto']['parte_*num'],
>>>>>                         '*ProductFamily.Nombre' =>
>>>>> $producto['*ProductFamily']['nombre'],
>>>>>                            // cliente de espectáculos *id.. Pero querer nombre
>>>>> de cliente de mesa de clientes según cliente *id.
>>>>>   //'Cliente.Nombre'=>$producto['*ProductFamily']['cliente_*id'],
>>>>>                         'Producto.Hierro_*oem' =>
>>>>> ($producto['Producto']['hierro_*oem']) ?  'Sistemas de hierro':'Tercer Partido',
>>>>>                         '*ProductType.Título' =>
>>>>> $producto['*ProductType']['título'],
>>>>>                         'Producto.Es_activo' => $estado,
>>>>>                     );
>>>>> }
>>>>>
>>>>> $dato = *json_*encode($registros);
>>>>> $*ret#nom:" . $Dato .",\*n";
>>>>> $*ret .= "*pageInfo:#unknown{^*totalRowNum:" . $Total . "},\*n";
>>>>> $*ret .= "*recordType : 'Variedad'}";
>>>>> eco $*ret;
>>>>> ?>*
>>>>> En viernes, junio 7, 2013 11:40:19 SOY *UTC-7, *Raks escribió:
>>>>>>
>>>>>> *Hi,
>>>>>>
>>>>>> Tengo una pieza de código habiendo vista, modelo y controlador . Yo *nee *dto
>>>>>> cambios de marca para ver sólo no en el *database.
>>>>>> Así que cómo puede *i hacer aquello.  Necesito editar modelo y controlador también.
>>>>>> Soy nuevo a *Cakephp y *MVC marco también.
>>>>>>
>>>>>> *Thanks.
>>>>>>
>>>>>  --
>>>>> Gustarnos en *FaceBook *https://www.facebook.com/***CakePHP<*https://www.facebook.com/*CakePHP>
>>>>> nos Encuentra en *Twitter *http://*twitter.*com/*CakePHP
>>>>>
>>>>> ---
>>>>> Recibiste este mensaje porque eres *subscribed al *Google
>>>>> Grupos "*CakePHP" grupo.
>>>>> A *unsubscribe de este grupo y la parón que recibe *emails de él, enviar
>>>>> un *email a pastel-*php+*u...@***googlegroups.*com.
>>>>>
>>>>> A correo a este grupo, envía *email a cake...@xxxxxxxxxxxxxxxx.
>>>>>
>>>>> Visita este grupo en *http://grupos.*google.*com/**Pastel/de grupo-*php<*http://grupos.*google.*com/Pastel/de grupo-*php>
>>>>> .
>>>>> Para más opciones, visita *https://grupos.*google.*com/**Los Grupos/optan_fuera de *https://grupos.*google.*com/Los<Grupos/optan_fuera>
>>>>> .
>>>>>
>>>>>
>>>>>
>>>>  --
>>>> Gustarnos en *FaceBook *https://www.facebook.com/***CakePHP<*https://www.facebook.com/*CakePHP>
>>>> nos Encuentra en *Twitter *http://*twitter.*com/*CakePHP
>>>>
>>>> ---
>>>> Recibiste este mensaje porque eres *subscribed a un tema en
>>>> el *Google Grupos "*CakePHP" grupo.
>>>> A *unsubscribe de este tema, visita *https://grupos.*google.*com/*d/**
>>>> Pastel/de tema-*php/2*KJFo4*Ix7*Ew/***unsubscribe<*https://grupos.*google.*com/*d/Pastel/de tema-*php/2*KJFo4*Ix7*Ew/*unsubscribe>
>>>> .
>>>>  A *unsubscribe de este grupo y todos sus temas, enviar un *email a pastel-*php+*u...@***googlegroups.*com.
>>>> 
>>>> A correo a este grupo, envía *email a cake...@xxxxxxxxxxxxxxxx.
>>>>
>>>> Visita este grupo en *http://grupos.*google.*com/**Pastel/de grupo-*php<*http://grupos.*google.*com/Pastel/de grupo-*php>
>>>> .
>>>> Para más opciones, visita *https://grupos.*google.*com/**Los Grupos/optan_fuera de *https://grupos.*google.*com/Los<Grupos/optan_fuera>
>>>> .
>>>>
>>>>
>>>>
>>>
>>>
>>>
>>> --
>>> -------**Ravinder *Kaur*--------
>>>
>>  --
>> Gustarnos en *FaceBook *https://www.facebook.com/*CakePHP
>> nos Encuentra en *Twitter *http://*twitter.*com/*CakePHP
>>
>> ---
>> Recibiste este mensaje porque eres *subscribed a un tema en
>> el *Google Grupos "*CakePHP" grupo.
>> A *unsubscribe de este tema, visita
>> *https://grupos.*google.*com/*d/Pastel/de tema-*php/2*KJFo4*Ix7*Ew/*unsubscribe.
>> A *unsubscribe de este grupo y todos sus temas, enviar un *email a pastel-*php+unsubscribe@xxxxxxxxxxxxxxxx.
>> 
>> A correo a este grupo, envía *email a pastel-php@xxxxxxxxxxxxxxxx.
>> Visita este grupo en *http://grupos.*google.*com/Pastel/de grupo-*php.
>> Para más opciones, visita *https://grupos.*google.*com/Los Grupos/optan_fuera.
>>
>>
>>
>
>
>
> --
> -------**Ravinder *Kaur*--------
>



-- 
-------**Ravinder *Kaur*--------

-- 
Gustarnos en *FaceBook *https://www.facebook.com/*CakePHP
nos Encuentra en *Twitter *http://*twitter.*com/*CakePHP

--- 
Recibiste este mensaje porque eres *subscribed al *Google Grupos "*CakePHP" grupo.
A *unsubscribe de este grupo y la parón que recibe *emails de él, enviar un *email a pastel-*php+unsubscribe@xxxxxxxxxxxxxxxx.
A correo a este grupo, envía *email a pastel-php@xxxxxxxxxxxxxxxx.
Visita este grupo en *http://grupos.*google.*com/Pastel/de grupo-*php.
Para más opciones, visita *https://grupos.*google.*com/Los Grupos/optan_fuera.


Table Products have a foreign key 'product_family_id'  and have belongs to
relationship with Product_families table.
Table Product_families have foreign key 'customer_id' and have belongs to
relationship with Customers table.
Now How can i connect Product model and Customer model to have customer
name in Product View.




On Wed, Jun 19, 2013 at 10:29 AM, Ravinder Kaur <kaur.r87@xxxxxxxxx> wrote:

> Yes I have model for all my tables..
>
>
> On Tue, Jun 18, 2013 at 7:25 PM, Eric Haskins <ehask71@xxxxxxxxx> wrote:
>
>> Do you have a Customers Model? I have models for all of my tables
>>
>>
>>
>>
>> On Monday, June 17, 2013 5:38:40 PM UTC-4, Raks wrote:
>>
>>> Returns an Error
>>>
>>> {"code":500,"url":"\/products\**/listing_data.json","name":"**Call to a member function find() on a non-object"}
>>>
>>>
>>>
>>> On Mon, Jun 17, 2013 at 1:26 PM, Gaurav Matta <gauravg...@xxxxxxxxx>wrote:
>>>
>>>> If you only want name of customers then you can add public $uses=
>>>> array('product','customer'); as a datamember in your controller class
>>>>
>>>> And you can use $this->customer->find('all') in ur action
>>>>
>>>> Let me know if this helps
>>>> On 17-Jun-2013 11:08 PM, "Raks" <kaur...@xxxxxxxxx> wrote:
>>>>
>>>>>  Have added a new Column... but m not able to get a column data from
>>>>> other model. I want name from customers table in products view.ctp.
>>>>>
>>>>> here's the view code:
>>>>> *<?php
>>>>> $records = array();
>>>>> foreach ($products as $product){
>>>>>
>>>>>     $status = ($product['Product']['is_active'] == '1') ? 'Enabled' :
>>>>> 'Disabled';
>>>>>
>>>>>     $records[] = array(
>>>>>                         'Product.model' => array('title' =>
>>>>> $product['Product']['model'], 'id' => $product['Product']['id']),
>>>>>                         'Product.part_num' =>
>>>>> $product['Product']['part_num'],
>>>>>                         'ProductFamily.name' =>
>>>>> $product['ProductFamily']['name'],
>>>>>                            // shows customer id.. but want customer
>>>>> name from customers table according to customer id.
>>>>>   //'Customer.name'=>$product['ProductFamily']['customer_id'],
>>>>>                         'Product.iron_oem' =>
>>>>> ($product['Product']['iron_oem']) ?  'Iron Systems':'Third Party',
>>>>>                         'ProductType.title' =>
>>>>> $product['ProductType']['title'],
>>>>>                         'Product.is_active' => $status,
>>>>>                     );
>>>>> }
>>>>>
>>>>> $data = json_encode($records);
>>>>> $ret = "{data:" . $data .",\n";
>>>>> $ret .= "pageInfo:{totalRowNum:" . $total . "},\n";
>>>>> $ret .= "recordType : 'array'}";
>>>>> echo $ret;
>>>>> ?>*
>>>>> On Friday, June 7, 2013 11:40:19 AM UTC-7, Raks wrote:
>>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> I Have a piece of code having view, model and controller . I nee dto
>>>>>> make changes to view only not in the database.
>>>>>> So how can i do that. Do I need to edit model and controller as well.
>>>>>> I am new to Cakephp and MVC framework too.
>>>>>>
>>>>>> Thanks.
>>>>>>
>>>>>  --
>>>>> Like Us on FaceBook https://www.facebook.com/**CakePHP<https://www.facebook.com/CakePHP>
>>>>> Find us on Twitter http://twitter.com/CakePHP
>>>>>
>>>>> ---
>>>>> You received this message because you are subscribed to the Google
>>>>> Groups "CakePHP" group.
>>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>>> an email to cake-php+u...@**googlegroups.com.
>>>>>
>>>>> To post to this group, send email to cake...@xxxxxxxxxxxxxxxx.
>>>>>
>>>>> Visit this group at http://groups.google.com/**group/cake-php<http://groups.google.com/group/cake-php>
>>>>> .
>>>>> For more options, visit https://groups.google.com/**groups/opt_out<https://groups.google.com/groups/opt_out>
>>>>> .
>>>>>
>>>>>
>>>>>
>>>>  --
>>>> Like Us on FaceBook https://www.facebook.com/**CakePHP<https://www.facebook.com/CakePHP>
>>>> Find us on Twitter http://twitter.com/CakePHP
>>>>
>>>> ---
>>>> You received this message because you are subscribed to a topic in the
>>>> Google Groups "CakePHP" group.
>>>> To unsubscribe from this topic, visit https://groups.google.com/d/**
>>>> topic/cake-php/2KJFo4Ix7Ew/**unsubscribe<https://groups.google.com/d/topic/cake-php/2KJFo4Ix7Ew/unsubscribe>
>>>> .
>>>>  To unsubscribe from this group and all its topics, send an email to
>>>> cake-php+u...@**googlegroups.com.
>>>> To post to this group, send email to cake...@xxxxxxxxxxxxxxxx.
>>>>
>>>> Visit this group at http://groups.google.com/**group/cake-php<http://groups.google.com/group/cake-php>
>>>> .
>>>> For more options, visit https://groups.google.com/**groups/opt_out<https://groups.google.com/groups/opt_out>
>>>> .
>>>>
>>>>
>>>>
>>>
>>>
>>>
>>> --
>>> -------*Ravinder Kaur*--------
>>>
>>  --
>> Like Us on FaceBook https://www.facebook.com/CakePHP
>> Find us on Twitter http://twitter.com/CakePHP
>>
>> ---
>> You received this message because you are subscribed to a topic in the
>> Google Groups "CakePHP" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/cake-php/2KJFo4Ix7Ew/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to
>> cake-php+unsubscribe@xxxxxxxxxxxxxxxx.
>> To post to this group, send email to cake-php@xxxxxxxxxxxxxxxx.
>> Visit this group at http://groups.google.com/group/cake-php.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>>
>
>
>
> --
> -------*Ravinder Kaur*--------
>



-- 
-------*Ravinder Kaur*--------

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@xxxxxxxxxxxxxxxx.
To post to this group, send email to cake-php@xxxxxxxxxxxxxxxx.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.


<Anterior por Tema] Tema Actual [Siguiente por Tema>