I am trying to get Cart_Price_Rule.
public function test()
{
$ruleArray = $this->adventCollectionFactory->create()->getData();
$ruleArray = array_column($ruleArray,'promo_rule_id');
return implode($ruleArray);
}
This allows me to see the 2 rule id i have pased in a collection
But how would I check it with rule repository individually My results are 1 and 2 and I have a cart price rule which has the ID of 1 and 2 I am trying to grab the description and code in phtml
\Magento\SalesRule\Model\RuleRepository $ruleRepository
$rule = $this->ruleRepository->getById($this->test()); //how do i pass it individually the id's
$rule->getDescription();
$rule->getCondition();