您好在 Magento 中创建了一个自定义模型(资源基于 Mage_Core_Model_Resource_Db_Collection_Abstract )。一切都很好。我试图对表进行过滤,这将输出以下where子句:
where
product_id = 1
and ((customer_id = 0 and customergroup_id = 2) or (customergroup_id = 0 and customer_id = 3))
and ((productgroup_id = 0 and product_class = 8) or (product_class = 0 and productgroup_id = 4))
关于如何使用addFilter或其他东西来做到这一点的任何想法?