How to populate rules in a Magento user module?

Created a custom module, such as Magento sales rules, to create a list of customers. I can display conditions in which I can select all client attributes and the value for these attributes.

enter image description here

These conditions are stored in a table sequentially. But I can’t get them to fill when I go to the editing screen. Although the conditions have been saved, it appears blank on the editing screen.

I looked at How to integrate condition rules for cart rules in the magento user module? , but it did not help

The value of the conditions in the database: a:3:{i:1;a:4:{s:4:"type";s:32:"salesrule/rule_condition_combine";s:10:"aggregator";s:3:"all";s:5:"value";s:1:"1";s:9:"new_child";s:0:"";}s:4:"1--1";a:4:{s:4:"type";s:31:"amrules/rule_condition_customer";s:9:"attribute";s:9:"firstname";s:8:"operator";s:2:"{}";s:5:"value";s:1:"r";}s:4:"1--2";a:4:{s:4:"type";s:31:"amrules/rule_condition_customer";s:9:"attribute";s:5:"email";s:8:"operator";s:2:"{}";s:5:"value";s:5:"yahoo";}}

Can someone please specify how to display saved conditions?

+4

All Articles