1

I just recently updated to 2.1.16 and noticed that multiple cart rules were not being applied any longer to the quote. It is only applying one now. The cart rules are still associating correctly if i were to check the rule conditions.

$fdbRules = $this->getActiveRules();

   foreach($fdbRules as $ruleItem)
   {
     $ruleCondition = $ruleItem->getActionCondition()->getConditions();

       foreach($ruleCondition as $condition)
       {
         if($condition->getAttributeName() == "category_ids")
         {
           if($condition->getOperator() === "==")
           {
             if($this->compareCategoryIds($product->getCategoryIds(), $condition->getValue()))
             {
             $applicableRules[$num]['id'] = $ruleItem->getRuleId();
             $applicableRules[$num]['name'] = $ruleItem->getName();
             $applicableRules[$num]['description'] = $ruleItem->getDescription();
             $applicableRules[$num]['simple_action'] = $ruleItem->getSimpleAction();
             $applicableRules[$num]['discount_amount'] = $this->formatPercent($ruleItem->getDiscountAmount());
             $applicableRules[$num]['category_ids'] = $condition->getValue();
             $num++;
            }
           }
         }
       }
   }

I am able to pull all associated rules to the product.

I am able to pull all associated rules to the product.

Only one rules is being applied in the quote.

Only one rules is being applied in the quote.

This was working fine before the update and wanted to see if anyone else knew if this was a bug or could test on their 2.1.16 for me.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.