Tuesday, February 12, 2013

RE: Plugin Ignores var $tablePrefix =[SOLVED]

My bad, there was a component calling:


$this->Cart = ClassRegistry::init('Cart');

 

Changed to $this->Cart = ClassRegistry::init('ShopCart'); and no more errors.

 

Dave

 

From: Advantage+ [mailto:movepixels@gmail.com]
Sent: Tuesday, February 12, 2013 9:27 PM
To: cake-php@googlegroups.com
Subject: Plugin Ignores var $tablePrefix =

 

Out of curiosity and to organize the tables in the database I want to prefix model tables based on the plugin, so my ShoppingManager plugin models will be shop_{model name} (shop_cart, shop_orders, shop_order_items)

 

In my carts.php model:

var $tablePrefix = 'shop_'; But all I get is the Missing Database table error.

 

The shopping_manger works up to the point where I am trying to prefix the table name.

 

Where am I going wrong?

Thanks,

 

Dave

No comments: