Fixes to OSB to work with KH 3.3
This commit is contained in:
@@ -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());
|
||||
}
|
||||
|
@@ -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();
|
Reference in New Issue
Block a user