diff --git a/core/lib/Thelia/Action/Product.php b/core/lib/Thelia/Action/Product.php index 5bdbca2f3..e0d750905 100644 --- a/core/lib/Thelia/Action/Product.php +++ b/core/lib/Thelia/Action/Product.php @@ -269,9 +269,9 @@ class Product extends BaseAction implements EventSubscriberInterface $product = $event->getProduct(); // Delete all product feature relations - if(null !== $featureProducts = FeatureProductQuery::create()->findByProductId($product->getId())){ + if (null !== $featureProducts = FeatureProductQuery::create()->findByProductId($product->getId())) { /** @var \Thelia\Model\FeatureProduct $featureProduct */ - foreach($featureProducts as $featureProduct){ + foreach ($featureProducts as $featureProduct) { $eventDelete = new FeatureProductDeleteEvent($product->getId(), $featureProduct->getFeatureId()); $event->getDispatcher()->dispatch(TheliaEvents::PRODUCT_FEATURE_DELETE_VALUE, $eventDelete); diff --git a/core/lib/Thelia/Core/Template/Loop/Coupon.php b/core/lib/Thelia/Core/Template/Loop/Coupon.php index 145202120..1f1738cf2 100644 --- a/core/lib/Thelia/Core/Template/Loop/Coupon.php +++ b/core/lib/Thelia/Core/Template/Loop/Coupon.php @@ -220,7 +220,6 @@ class Coupon extends BaseI18nLoop implements PropelSearchLoopInterface // which adds a product to the cart. $discount = $couponManager->isInUse() ? $couponManager->exec() : 0; - $loopResultRow ->set("ID", $coupon->getId()) ->set("IS_TRANSLATED", $coupon->getVirtualColumn('IS_TRANSLATED')) diff --git a/core/lib/Thelia/Core/Template/Smarty/Plugins/TheliaLoop.php b/core/lib/Thelia/Core/Template/Smarty/Plugins/TheliaLoop.php index e041b1d15..50852df55 100644 --- a/core/lib/Thelia/Core/Template/Smarty/Plugins/TheliaLoop.php +++ b/core/lib/Thelia/Core/Template/Smarty/Plugins/TheliaLoop.php @@ -217,8 +217,9 @@ class TheliaLoop extends AbstractSmartyPlugin { //Block the smarty interpretation in the elseloop if ($content === null) { - if ( ! $this->checkEmptyLoop($params)){ + if ( ! $this->checkEmptyLoop($params)) { $repeat = false; + return ''; } } diff --git a/core/lib/Thelia/Coupon/Type/CouponAbstract.php b/core/lib/Thelia/Coupon/Type/CouponAbstract.php index a0bdf2db1..addc9a05e 100644 --- a/core/lib/Thelia/Coupon/Type/CouponAbstract.php +++ b/core/lib/Thelia/Coupon/Type/CouponAbstract.php @@ -182,7 +182,7 @@ abstract class CouponAbstract implements CouponInterface } /** - * @param true $perCustomerUsageCount + * @param true $perCustomerUsageCount * @return $this */ public function setPerCustomerUsageCount($perCustomerUsageCount) @@ -428,8 +428,8 @@ abstract class CouponAbstract implements CouponInterface * * This method should be overriden to be useful. * - * @param string $fieldName - * @param string $fieldValue + * @param string $fieldName + * @param string $fieldValue * @return mixed * @throws \InvalidArgumentException if the field value is not valid. */ @@ -509,7 +509,8 @@ abstract class CouponAbstract implements CouponInterface // Does nothing. Override this function as needed. } - public function isInUse() { + public function isInUse() + { return in_array( $this->code, $this->facade->getRequest()->getSession()->getConsumedCoupons() diff --git a/core/lib/Thelia/Model/Order.php b/core/lib/Thelia/Model/Order.php index 85fa72e67..b20cc3742 100644 --- a/core/lib/Thelia/Model/Order.php +++ b/core/lib/Thelia/Model/Order.php @@ -89,7 +89,6 @@ class Order extends BaseOrder return parent::preSave($con); } - /** * {@inheritDoc} */