// Comment useless line in order to clean this

// Add table and identifier to CartRule class
This commit is contained in:
aFolletete
2011-12-03 09:56:38 +00:00
parent d26a41caaf
commit a0f787ea32
2 changed files with 6 additions and 2 deletions
+3 -2
View File
@@ -321,7 +321,8 @@ class CartCore extends ObjectModel
$row['description'] = $row['name'];
}
$results = $this->getCartRule();
// TODO Clean the following line, this line generate bug because getCartRule method not exists
//$results = $this->getCartRule();
return $result;
}
@@ -825,7 +826,7 @@ class CartCore extends ObjectModel
/* Add product to the cart */
else
{
$sql = 'SELECT stock.out_of_stock, IFNULL(stock.quantity, 0)
$sql = 'SELECT stock.out_of_stock, IFNULL(stock.quantity, 0) as quantity
FROM '._DB_PREFIX_.'product p
'.Product::sqlStock('p', $id_product_attribute, true, $shop).'
WHERE p.id_product = '.$id_product;
+3
View File
@@ -62,6 +62,9 @@ class CartRuleCore extends ObjectModel
'identifier' => 'id_cart_rule',
);
protected $table = 'cart_rule';
protected $identifier = 'id_cart_rule';
protected $fieldsRequired = array('date_from', 'date_to');
protected $fieldsSize = array('code' => 254, 'description' => 65534);
protected $fieldsValidate = array(