I need to read the condition of a shopping cart price rule in magento programatically.
Mage_SalesRule_Model_Rule
has a method getConditionsSerialized()
which does provide the conditions but in a cryptic manner to say the least such as the following:
a:7:{s:4:"type";s:32:"salesrule/rule_condition_combine";s:9:"attribute";N;s:8:"operator";N;s:5:"value";s:1:"1";s:18:"is_value_processed";N;s:10:"aggregator";s:3:"all";s:10:"conditions";a:1:{i:0;a:5:{s:4:"type";s:32:"salesrule/rule_condition_address";s:9:"attribute";s:13:"base_subtotal";s:8:"operator";s:2:">=";s:5:"value";s:1:"1";s:18:"is_value_processed";b:0;}}}
Does anyone know how to read the condition in a more humane way plz? I'd like to be able to read certain attributes.
Thanks a bunch!
Krt_Malta