0
我正在通過性別和姓名收集客戶集合。我需要根據國家/地區ID添加過濾器,但需要在地址收集中查找每個客戶的國家/地區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();
請接受的答案,如果你覺得有用 –