Re: Shopping Cart in CakePHP

2006-06-10 Thread Armando Sosa
I think component is the way to go. I've done a Cart component based on the example in the rails book but I lost it when my harddrive cecided to die :(On 6/10/06, brandags <[EMAIL PROTECTED]> wrote: I'm trying to make a simple shopping cart - just basically a way tostore product id's in the sessio

Shopping Cart in CakePHP

2006-06-10 Thread brandags
I'm trying to make a simple shopping cart - just basically a way to store product id's in the session, and maybe a function that calls a view to display the cart. Should I be doing this as a regular controller, or should I make a component for it? Either way, how can I make the cart (as well as t

Re: Newbie: function for default layout

2006-06-10 Thread xhenxhe
Thanks clemos, it's all starting to make sense :) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send

Re: Arrays in sessions.

2006-06-10 Thread Carlos Mauricio Samour
Well I just answered my own question by doing this: $this->set('data', $this->Session->read('Transaccion')); Once againg: CAKE RULES! On 6/10/06, Carlos Mauricio Samour <[EMAIL PROTECTED]> wrote: > On the wiki I read that if you wanted to save an array with the > session component you do this: >

Re: Cameleon preview

2006-06-10 Thread Olivier Percebois-Garve
Yep I really like it. I spotted a few glitches in Cameleon I'll put up some bug fixes this night or tomorrow morning. If you've some comment on general design of the code, feel free... RosSoft wrote: > Cool, you're using HeadHelper :) > > > > > > --~--~-~--~~~---

Re: default index.php rewrite rule works for app/ and app/webroot, but not for /

2006-06-10 Thread [EMAIL PROTECTED]
Of course, that solution does work, as one would expect. In fact, I am going to make this my standard install method, since it is more secure. However, after searching the apache error_log, I saw this: [Sat Jun 10 13:35:23 2006] [error] [client x.x.x.x] Negotiation: discovered file(s) matching r

Arrays in sessions.

2006-06-10 Thread Carlos Mauricio Samour
On the wiki I read that if you wanted to save an array with the session component you do this: $this->Session->write( 'Transaccion\'][\'0' , $this->params['data']['Transaccion']); How do you read this session data? Y tried: $dtos = $this->Session->read('[Transaccion]'); and it gives me nothing ba

Re: prevent expiration of session info?

2006-06-10 Thread Carlos Mauricio Samour
Could you please explain what you did to store the session info in the database? I am trying to set up something just like that. Thanks On 5/29/06, Dave <[EMAIL PROTECTED]> wrote: > > What I ended up doing was creating my own database-driven solution. > Turns out to be pretty simple. You don't ne

Re: default index.php rewrite rule works for app/ and app/webroot, but not for /

2006-06-10 Thread RosSoft
first, try changing DocumentRoot to /var/www//htdocs/app/webroot --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe fr

Re: Cameleon preview

2006-06-10 Thread RosSoft
Cool, you're using HeadHelper :) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL

default index.php rewrite rule works for app/ and app/webroot, but not for /

2006-06-10 Thread [EMAIL PROTECTED]
This is a very strange problem. I cannot the second rule in the root .htaccess file to process: RewriteRule (.*)app/webroot/$1 [L] However the first rule works fine: RewriteRule ^$app/webroot/ [L] I know, because I renamed the root index.php file, and I was still routed to app/webroot/in

Re: creating a selectTag from an enum in the model

2006-06-10 Thread John Zimmerman [gmail]
I will add it to the enhancement list then.The only reason I might consider it a bug is that if you bake the views/model/controller and the enum column is in your table, the code that is generated renders errors because of it.  I have not tested it with scaffolding however, but I assume the same wo

Re: How to with layout/templates?

2006-06-10 Thread John Zimmerman [gmail]
Chris Kausel created a class called Icing which I have not tried but I believe is trying to address some of the concerns that you have.You can view the code at http://cakeforge.org/snippet/detail.php?type=snippet&id=67Cake does not have built in support for the traditional "Theme" idea which I bel

Internal Server Error

2006-06-10 Thread [EMAIL PROTECTED]
I was getting the same problems as this earlier post: http://groups.google.com/group/cake-php/browse_thread/thread/74829e6c96bd3ba0/eca31f5fe023547b?q=internal+server+error&rnum=1#eca31f5fe023547b I made the suggested changes to my .htaccess files and it then worked perfectly! Can any apache g

Re: Videos not working...Plugin?

2006-06-10 Thread Bordas Guillaume
Without Itune:http://www.apple.com/quicktime/download/standalone.htmlWithout Quicktime (with Media Player Classic): http://www.free-codecs.com/download/QuickTime_Alternative.htm2006/6/9, nate <[EMAIL PROTECTED]>: Per the screencast page:Download the latest QuickTime:http://www.apple.com/quicktime/d

Cameleon preview

2006-06-10 Thread Olivier Percebois-Garve
For those who are bored, I've released a alpha "preview" package of Cameleon - the tiny tree-based CMS. http://cakeforge.org/projects/cameleon/ The application seems to have reached some stability, even if a lot of things are missing or need to be completed. It is not-at-all-production-ready.

Re: How optimize application?

2006-06-10 Thread kiniu
Thank you nate for your help. I think that I have to work on Cake. Regards, Krzysiek --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com

Re: How optimize application?

2006-06-10 Thread nate
The one thing you can do, although this may make it harder to debug your app, is set var $persistModel = true; in your controller. This will cache your constructed model files. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Goog

Re: How optimize application?

2006-06-10 Thread nate
kiniu wrote: > So how deep this relation goes? All the way down. > But if I don't need all of them and only A, B, C how to do this? You don't. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group.

Re: How optimize application?

2006-06-10 Thread kiniu
So how deep this relation goes? if I've Model A related to B and C, model B to D, C to E and E to F all models are required. But if I don't need all of them and only A, B, C how to do this? --~--~-~--~~~---~--~~ You received this message because you are subscrib

Re: How optimize application?

2006-06-10 Thread nate
Yes, if I'm loading Model A, which is related to Models B and C, then all three are required. However, if Model D is not related to A, B or C, then it is not required. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Re: How optimize application?

2006-06-10 Thread kiniu
nate wrote: > All model files are loaded, but only the required model classes are > constructed. Besides that, this is typically the one of the > lower-overhead operations in the request. The best thing to focus on > are your views and view caching. I added to AppModel class this function

Re: How optimize application?

2006-06-10 Thread nate
All model files are loaded, but only the required model classes are constructed. Besides that, this is typically the one of the lower-overhead operations in the request. The best thing to focus on are your views and view caching. --~--~-~--~~~---~--~~ You receiv

How optimize application?

2006-06-10 Thread [EMAIL PROTECTED]
Hi, My application has ~30 model. Each time I request some action it takes 0.5 - 1s to generate view. Each time Cake loads all models but I don't need each time all of them. My question is: Is there in Cake any possibility to construct only these models which I actually need. Some variable in co

Re: Set table prefix from session?

2006-06-10 Thread nate
ConnectionManager::getDataSource('default')->config['prefix'] = this->Session->read('User.database_table_prefix'); --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email

Re: creating a selectTag from an enum in the model

2006-06-10 Thread nate
I don't really see it as a bug, since Cake makes the data available, as in the solution above, but I could see doing some sort of enhancement. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To pos

Set table prefix from session?

2006-06-10 Thread David Pärsson
Hi, is it possible to set the table prefix to use in a model from a session variable? I tried to set the tablePrefix variable from the controller in the beforeFilter() function like this $this->Model->tablePrefix = $this->Session->read('User.database_table_prefix'); but it didn't seem to work

Render views from other controllers

2006-06-10 Thread Gonçalo Marrafa
Hi. Is there a way of automatically render a view from another controller? If i use requestAction('/somecontroller/someaction', array('return')) i still nedd to have a view on the current controller with a placeholder for the rendered view. What i would like to do is to show only the rendered act