// Retro compatibility for Discount

This commit is contained in:
dMetzger
2011-11-02 10:47:01 +00:00
parent e7c0b0bdf9
commit 7f830c2f4e
6 changed files with 215 additions and 481 deletions
+9 -1
View File
@@ -29,6 +29,7 @@ class OrderDiscountCore extends OrderCartRule
{
public function __get($key)
{
Tools::displayAsDeprecated();
if ($key == 'id_order_discount')
return $this->id_order_cart_rule;
if ($key == 'id_discount')
@@ -38,10 +39,17 @@ class OrderDiscountCore extends OrderCartRule
public function __set($key, $value)
{
Tools::displayAsDeprecated();
if ($key == 'id_order_discount')
$this->id_order_cart_rule = $value;
if ($key == 'id_discount')
$this->id_cart_rule = $value;
$this->{$key} = $value;
}
}
public function __call($method, $args)
{
Tools::displayAsDeprecated();
return call_user_func_array(array($this->parent, $method), $args);
}
}