// Comment useless line in order to clean this
// Add table and identifier to CartRule class
This commit is contained in:
+3
-2
@@ -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;
|
||||
|
||||
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user