【发布时间】:2015-07-13 06:47:43
【问题描述】:
我正在按性别和姓名收集客户。我需要按国家 ID 添加过滤器,但每个客户的国家 ID 位于地址集合中。
$collection = Mage::getModel('customer/customer')->getCollection()
->addAttributeToSelect('*');
->addAttributeToFilter('firstname', $post['firstname']);
->addAttributeToFilter('gender', $post['gender']);
->load();
所以我需要这样的东西:
$collection = Mage::getModel('customer/customer')->getCollection()
->addAttributeToSelect('*');
->addAttributeToFilter('firstname', $post['firstname']);
->addAttributeToFilter('gender', $post['gender']);
->addAttributeToFilter('country_id', $post['country_id']);//US
->load();
【问题讨论】:
-
如果您觉得有帮助,请采纳答案
标签: magento magento-1.7 magento-1.8 magento-1.9