magento中的客户邀请
我们可以找到Magento的特定客户邀请他们说“[email protected]”的电子邮件地址吗?magento中的客户邀请
我知道我们可以取为那些谁由表rewardpoints_referral接受了邀请的纪录,
我的问题是,在这里我们可以得到哪些是不能接受的记录还没有,如果是,那么该表?
谢谢!
如果您正在使用J2T的积分和奖励模块(1)
这个片段将列出那些尚未注册为客户推荐尚的所有电子邮件。 我已经在28000客户群上测试过它,速度非常快。
/* Retrieve all referrals emails */
$allReferrals = Mage::getModel('rewardpoints/referral')->getCollection();
foreach($allReferrals as $referral) {
$allReferralsEmails[] = $referral->getRewardpointsReferralEmail();
}
/* Retrieve all signed-up customers that are referrals */
$allReferralsCustomers = Mage::getResourceModel('customer/customer_collection')->addFieldToFilter('email', array('in'=>$allReferralsEmails));
foreach($allReferralsCustomers as $allReferralsCustomer) {
$allReferralsCustomerData = $allReferralsCustomer->getData();
$allReferralsCustomersEmails[] = $allReferralsCustomerData['email'];
}
/* Extract referrals that are not signed-up customers */
$notSignedUpReferralsEmails = array_diff($allReferralsEmails, $allReferralsCustomersEmails);
print_r($notSignedUpReferralsEmails);
(1)rewardpoints_referral表应该有这样的结构:
rewardpoints_referral_id int(11) UNSIGNED No auto_increment
rewardpoints_referral_parent_id int(11) UNSIGNED No
rewardpoints_referral_child_id int(11) UNSIGNED Yes NULL
rewardpoints_referral_email varchar(255) utf8_general_ci No
rewardpoints_referral_name varchar(255) utf8_general_ci Yes NULL
rewardpoints_referral_status tinyint(1) Yes 0
@ vrnrt ..感谢您的回应! rewardpoints_referral表具有相同的结构,但是rewardpoints_referral_status显示了如果被邀请的人已经购买或未购买的状态,其在这里不显示是否已经注册。 – PHP 2011-03-25 04:31:05
@Shine - 我已更新我的答案,以列出所有未作为客户注册的推介电子邮件。 – 2011-03-26 12:40:52
请重新表述您的问题,它是添加你确切的Magento版本有用的,如果你使用的是扩展到管理的邀请,然后其良好提及 – 2011-03-24 07:56:09
这是企业版还是CE? – balexandre 2011-03-24 08:01:12
正在使用Magento ver。 1.4.0.1 CE – PHP 2011-03-24 08:39:15