I want to filter cart rules list in my account page. I've list cart rules in My Account page "Dashboard". But I want to filter cart rules list by condition.
I've configure the conditions in cart rules by date of birth. I just want to show the rules if the customer date of birth is same with my conditions.
I got the Data from \Magento\Customer\Block\Account\Dashboard\Info
. but I dont know how to filter cart rules list.
$datax = $helper->getSalesRule();
echo '<pre>';
print_r($datax->getData());
echo '</pre>';
and the result
[
conditions_serialized
]=>{
"type":"Magento\\SalesRule\\Model\\Rule\\Condition\\Combine",
"attribute":null,
"operator":null,
"value":"1",
"is_value_processed":null,
"aggregator":"all",
"conditions":[
{
"type":"Magento\\CustomerSegment\\Model\\Segment\\Condition\\Segment",
"attribute":false,
"operator":"==",
"value":"138,110",
"is_value_processed":false
}
]
}