Fixes to OSB to work with KH 3.3

This commit is contained in:
Deon George
2012-11-10 10:13:57 +11:00
parent ea36639638
commit 6db02ae77d
238 changed files with 813 additions and 938 deletions

View File

@@ -19,7 +19,7 @@ class Cart {
* Return a list of items in the cart
*/
public function contents() {
return ORM::factory('cart')
return ORM::factory('Cart')
->where('session_id','=',Session::instance()->id());
}

View File

@@ -83,7 +83,7 @@ class Controller_Cart extends Controller_TemplateDefault {
* Add an item to the cart
*/
public function action_add() {
$cart = ORM::factory('cart');
$cart = ORM::factory('Cart');
$cart->session_id = Session::instance()->id();
@@ -96,13 +96,13 @@ class Controller_Cart extends Controller_TemplateDefault {
echo Kohana::debug($cart->validate()->errors());
if ($cart->saved())
Request::current()->redirect('cart/index');
HTTP::redirect('cart/index');
else
throw new Kohana_Exception(_('There was a problem adding the item to the cart.'));
}
public function action_empty() {
$cart = ORM::factory('cart')
$cart = ORM::factory('Cart')
->where('session_id','=',session_id());
$cart->delete_all();