Re: CakePhp Wordpress Integration

2010-07-28 Thread Erik Starck
Is it possible to put the blog on a different server such as blog.yourdomain.com? I think that will save you a lot of headache. BR Erik On Tue, Jul 27, 2010 at 9:03 AM, jasmin wish dwis...@gmail.com wrote: Hi,     I have created a admin panel in Cakephp and want to add blog section in it so

Re: Accessing one model from another (unrelated) model

2010-06-30 Thread Erik Starck
Hi, this is a bit more cakeish: App::import('Product', 'Product'); $this-Product = new Product(); Now you can use the model as you ordinary would with e.g. $this-Product-find(...) Erik Starck @erikstarck http://www.softwaresweden.com On Tue, Jun 29, 2010 at 5:12 PM

Re: Undefined id and don´t know why....

2010-06-30 Thread Erik Starck
Have you done this: http://book.cakephp.org/view/437/primaryKey in your Model? Erik Starck On Wed, Jun 30, 2010 at 11:49 AM, Davor Ilic webfa...@gmail.com wrote: Hi cakers, i have a problem by using this code: if(!empty($this-data)) { $product

Re: Accessing one model from another (unrelated) model

2010-06-29 Thread Erik Starck
...but the question was a model in a model, not in a controller. I'm using this in my model class: $Category = ClassRegistry::init(Category); $category = $Category-findById($underThisCategoryId); Don't know if there's a better way. loadModel would be nicer I suppose. BR Erik On Tue, Jun

Model naming for SKU?

2010-06-28 Thread Erik Starck
What is the correct name of the model and database table for an object called Sku, as in: http://en.wikipedia.org/wiki/Stock-keeping_unit ? When I use cake bake I get some confusing messages, sometimes it wants me to call the database table skuses, sometimes just skus. Now I have a model class

Re: Model naming for SKU?

2010-06-28 Thread Erik Starck
a table of its own? On Mon, Jun 28, 2010 at 12:12 PM, Erik Starck erik.sta...@gmail.com wrote: What is the correct name of the model and database table for an object called Sku, as in: http://en.wikipedia.org/wiki/Stock-keeping_unit ? When I use cake bake I get some confusing messages

Re: Possible bug in Tree, recover

2010-06-23 Thread Erik Starck
On Tue, Jun 22, 2010 at 6:56 PM, cricket zijn.digi...@gmail.com wrote: Interesting. You should post a ticket here: http://cakephp.lighthouseapp.com/dashboard Ok, I added it: http://cakephp.lighthouseapp.com/projects/42648-cakephp/tickets/848-save-bug-in-treebehaviorrecover Erik S.

Possible bug in Tree, recover

2010-06-22 Thread Erik Starck
Hi group! My first post to this list so here goes... I may have found a bug in the recover method in Tree.php, cake 1.3.2. I was getting an SQL error when calling recover: SQL Error: 1062: Duplicate entry '20' for key 'PRIMARY' Here is an example of the SQL: UPDATE `categories` SET `id` = 20,