Cart work for payments and Paypal work to test
This commit is contained in:
37
modules/cart/classes/Cart/Item.php
Normal file
37
modules/cart/classes/Cart/Item.php
Normal file
@@ -0,0 +1,37 @@
|
||||
<?php defined('SYSPATH') or die('No direct access allowed.');
|
||||
|
||||
/**
|
||||
* This class provides a Cart Item
|
||||
*
|
||||
* @package OSB
|
||||
* @subpackage Cart
|
||||
* @category Helpers
|
||||
* @author Deon George
|
||||
* @copyright (c) 2010 Deon George
|
||||
* @license http://dev.leenooks.net/license.html
|
||||
*/
|
||||
class Cart_Item {
|
||||
// Quantity
|
||||
private $q = 0;
|
||||
// Item
|
||||
private $i = 0;
|
||||
// Total
|
||||
private $t = 0;
|
||||
|
||||
public function __construct($q,$i,$t) {
|
||||
$this->q = $q;
|
||||
$this->i = $i;
|
||||
$this->t = $t;
|
||||
}
|
||||
|
||||
public function __get($key) {
|
||||
switch($key) {
|
||||
case 'i':
|
||||
case 'q': return $this->{$key};
|
||||
case 't': return Currency::display($this->{$key});
|
||||
|
||||
default: throw new Kohana_Exception('Unknown Key :key',array(':key',$key));
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
Reference in New Issue
Block a user