Exemplo n.º 1
0
 /**
  * Apply promotional rules
  *
  * @return $this
  */
 public function applyPromotionalRules()
 {
     foreach ($this->promotionalRules->getAll() as $promotionalRule) {
         if ($promotionalRule instanceof PromotionalRuleApplyInterface) {
             if ($promotionalRule->needApply($this)) {
                 $promotionalRule->apply($this);
             }
         }
     }
     return $this;
 }