diff --git a/core/lib/Thelia/Controller/Admin/CouponController.php b/core/lib/Thelia/Controller/Admin/CouponController.php index ab018e245..c372ffca3 100755 --- a/core/lib/Thelia/Controller/Admin/CouponController.php +++ b/core/lib/Thelia/Controller/Admin/CouponController.php @@ -31,6 +31,7 @@ use Thelia\Coupon\CouponRuleCollection; use Thelia\Form\CouponCreationForm; use Thelia\Form\Exception\FormValidationException; use Thelia\Model\Coupon; +use Thelia\Model\CouponQuery; /** * Created by JetBrains PhpStorm. diff --git a/core/lib/Thelia/Model/Coupon.php b/core/lib/Thelia/Model/Coupon.php index 9718b5e36..6de6049ef 100755 --- a/core/lib/Thelia/Model/Coupon.php +++ b/core/lib/Thelia/Model/Coupon.php @@ -48,7 +48,7 @@ class Coupon extends BaseCoupon * * @return \Thelia\Model\Coupon The current object (for fluent API support) */ - public function setSerializedRules(CouponRuleCollection $rules) + public function setRules(CouponRuleCollection $rules) { if ($rules !== null) { @@ -70,7 +70,7 @@ class Coupon extends BaseCoupon * * @return CouponRuleCollection Rules ready to be processed */ - public function getSerializedRules() + public function getRules() { return unserialize(base64_decode($this->serialized_rules)); }