Re: problem with virtual fieds cakephp2

2013-07-02 Thread Dakota
If it was just a standard model then you wouldn't be using a virtual field. Post your virtualfield definition and how you are calling the find. With the amount of information you've given us so far my best guess is that your electrons aren't calibrated well enough and need more ion-flux. On Tue

Re: CakePHP - Empty $this->request->data array after Ajax POST

2013-07-02 Thread Dakota
First suggestion would to be upgrade to jQuery 1.10, I've had issues with < 1.9 on IE10. Is your pass_data a json string? If that is the case then you need to tell CakePHP to actually parse the JSON data. The easiest way is to simply add the RequestHandler component. On Tuesday, 2 July 2013 13

Re: 301 infinite redirect

2013-07-02 Thread floydbrush
Hi AD, after one complete day of debug/experiment without success, I noticed that attribute Age: 0 appears at the second Server Response of the loop. Searching for the specification of the Age header field, I suspect the presence of the header field Age: 0 maybe means that the response is sent

Re: CakePHP - Empty $this->request->data array after Ajax POST

2013-07-02 Thread 清水紘己
using $(form).serialize() for data works fine. alternative way is $.param(pass_data) 2013/7/2 Juraj Vlk > I'm trying to save data which comes from Ajax POST request in JSON but > There is empty $this->request->data in controller. > > My Ajax call: > > $.ajax({ > type: "POST", > url: 'lo

Re: CakePHP - Empty $this->request->data array after Ajax POST

2013-07-02 Thread Gaurav Matta
http://itfeast.blogspot.in/2013/06/cakephp-send-multiple-elements-in-ajax.html?m=1 Follow above link might help you or see jshelper for this version of cake On 02-Jul-2013 7:56 PM, "Juraj Vlk" wrote: > I'm trying to save data which comes from Ajax POST request in JSON but > There is empty $this-

Re: Help calculated field in model

2013-07-02 Thread 清水紘己
1. use virtualFields 2. modify results in afterFind() Callback 3. create Helper and its method 4. use Entity(plugin) and define price() method(or magic property) I will perhaps choose 3 or 4 because assumed that the user for calculation is on the context of actions. e.g. function price($item, $us

Re: problem with virtual fieds cakephp2

2013-07-02 Thread euromark
Why the duplicate post https://groups.google.com/forum/#!topic/cake-php/sHON-jgTeLM ? Am Dienstag, 2. Juli 2013 15:49:57 UTC+2 schrieb frocco: > > It is just a standard model that has 4 price fields. > > When a query is performed, I want to return one of those fields as price, > not price1 .. 4

Re: problem with virtual fieds cakephp2

2013-07-02 Thread frocco
It is just a standard model that has 4 price fields. When a query is performed, I want to return one of those fields as price, not price1 .. 4 I have a user field called pricelevel that I will check. On Friday, June 28, 2013 2:41:55 AM UTC-4, Dakota wrote: > > We might be able to help you if y

CakePHP - Empty $this->request->data array after Ajax POST

2013-07-02 Thread Juraj Vlk
I'm trying to save data which comes from Ajax POST request in JSON but There is empty $this->request->data in controller. My Ajax call: $.ajax({ type: "POST", url: 'localhost/pages/register', dataType: 'json', data: pass_data, }); I use Cakephp 2.3. and JQuery 1.7 Do you have

Help calculated field in model

2013-07-02 Thread frocco
Hello, I have 4 price fields in my model. price1 price2 price3 price4 I only want to return a field called price for any queries. price will be one of the 4 price fields based on a condition. if userlevel is 'A' return price1 if userlevel is 'B' return price2 How can I do this in cakephp? Tha