Bigcommerce: 给已完成购买的客户发送一封产品评论邮件,让客户直接进行产品评论
2013-06-25 19:42
260 查看
需求说明:进入后台的Order列表,更新订单状态:Awaiting Pickup后,就会给客户发送一封希望他们能进行评论的邮件。在邮件中展示该订单下的所有产品,每个产品都有一个评论的跳转链接,点击后直接跳到产品页面,并定位到产品的评论表单,方便客户直接操作。
具体开发步骤:
第一步:修改config/config.php配置文件,这里是对Order的状态是否要发送邮件进行控制
$GLOBALS['ISC_CFG']['OrderStatusNotifications'] = '11,9,2,5,4';
改成:
$GLOBALS['ISC_CFG']['OrderStatusNotifications'] = '11,9,8,2,5,4';
第二步:修改lib/orders.php
查找:if (empty($GLOBALS['SNIPPETS']['CartItems'])) {
$emailTemplate->SetTemplate("order_status_email");
} else {
$emailTemplate->SetTemplate("order_status_downloads_email");
}
改为:
if (empty($GLOBALS['SNIPPETS']['CartItems'])) {
//arlinger info 2013-6-15
if ($status == 8) {
$query1 = "
SELECT *
FROM [|PREFIX|]order_products
WHERE orderorderid ='".$orderId."'";
$result1 = $GLOBALS['ISC_CLASS_DB']->Query($query1);
$GLOBALS['AllLi']="";
while ($product_row1 = $GLOBALS['ISC_CLASS_DB']->Fetch($result1)) {
$GLOBALS['AllLi'].=" <li style='list-style:none;float:left;padding:15px 3% 5px 3%;width:88%;margin:10px 3% 0 3%;background:#f0f0f0;border:1px solid #e7e7e7;'><a style='color:#0074ff;text-decoration:none;font-family:Arial;' href='".prodLink(isc_html_escape($product_row1['ordprodname']))."'>".isc_html_escape($product_row1['ordprodname'])." </a>
<div style='float:left;width:100%;margin:15px 0;display:inline;'>
<a href='".prodLink(isc_html_escape($product_row1['ordprodname']))."?Reviews=ON' style='float:left;margin:0 5% 0 0;width:47%;padding:15px 0 0 0;border:1px solid #678ca8;background:#fff;height:35px;line-height:18px;text-align:center;text-decoration:none;color:#6e93af;font-size:13px;font-weight:600;'>Review this product</a>
<a href='https://www.resellerratings.com/store/SecurityCamera2000' style='float:left;padding:15px 0 0 0;margin:0;width:47%;border:1px solid #678ca8;background:#fff;height:35px;line-height:18px;text-align:center;text-decoration:none;color:#6e93af;font-size:13px;font-weight:600;'>Feedback to Resellerratings</a></div>
</li> " ;
}
$GLOBALS['OrderReviewdHi'] = isc_html_escape($customer['custconfirstname']);
$emailTemplate->SetTemplate("order_status_email_PL");
}else{
$emailTemplate->SetTemplate("order_status_email");
}
第三步:添加了文件:/includes/classes/class.reviewpl.php和根目录下的:postreviewpl.php
/templates/__emails/下面添加了:order_status_email_PL.html,内容如下:
<html><body style="font-family: Arial; font-size: 12px;">
<div style="padding: 0 20px 0 20px;font-family:Tahoma;">
<div style="color:#6b9dba;margin:10px 0 15px 0;text-align:center;font-size:14px;"><span style="color:#969696;font-weight:500;">Hi </span>%%GLOBAL_OrderReviewdHi%%<span style="color:#969696;font-size:500;">,</span></div>
<p style="border-bottom: 1px dashed #d9d9d9;color:#656565;font-size:0.95em;margin:0 0 0 5%;padding:0 0 15px 0;line-height:20px;text-align:center;">how did this item meet your expectation? We would love your honest feedback on each of the items you purchased.</p>
<ul class="OrderItemList">
%%GLOBAL_AllLi%%
</ul>
</div>
</body>
</html>
PS:
1.邮件服务器会屏蔽js内容,没有查询到相关结果
2.没有验证码,产品评论不成功!?tab=ProductReviews
3.评论表单的功能修改PHP文件为:/includes/classes/class.reviewpl.php和根目录下的:postreviewpl.php
具体开发步骤:
第一步:修改config/config.php配置文件,这里是对Order的状态是否要发送邮件进行控制
$GLOBALS['ISC_CFG']['OrderStatusNotifications'] = '11,9,2,5,4';
改成:
$GLOBALS['ISC_CFG']['OrderStatusNotifications'] = '11,9,8,2,5,4';
第二步:修改lib/orders.php
查找:if (empty($GLOBALS['SNIPPETS']['CartItems'])) {
$emailTemplate->SetTemplate("order_status_email");
} else {
$emailTemplate->SetTemplate("order_status_downloads_email");
}
改为:
if (empty($GLOBALS['SNIPPETS']['CartItems'])) {
//arlinger info 2013-6-15
if ($status == 8) {
$query1 = "
SELECT *
FROM [|PREFIX|]order_products
WHERE orderorderid ='".$orderId."'";
$result1 = $GLOBALS['ISC_CLASS_DB']->Query($query1);
$GLOBALS['AllLi']="";
while ($product_row1 = $GLOBALS['ISC_CLASS_DB']->Fetch($result1)) {
$GLOBALS['AllLi'].=" <li style='list-style:none;float:left;padding:15px 3% 5px 3%;width:88%;margin:10px 3% 0 3%;background:#f0f0f0;border:1px solid #e7e7e7;'><a style='color:#0074ff;text-decoration:none;font-family:Arial;' href='".prodLink(isc_html_escape($product_row1['ordprodname']))."'>".isc_html_escape($product_row1['ordprodname'])." </a>
<div style='float:left;width:100%;margin:15px 0;display:inline;'>
<a href='".prodLink(isc_html_escape($product_row1['ordprodname']))."?Reviews=ON' style='float:left;margin:0 5% 0 0;width:47%;padding:15px 0 0 0;border:1px solid #678ca8;background:#fff;height:35px;line-height:18px;text-align:center;text-decoration:none;color:#6e93af;font-size:13px;font-weight:600;'>Review this product</a>
<a href='https://www.resellerratings.com/store/SecurityCamera2000' style='float:left;padding:15px 0 0 0;margin:0;width:47%;border:1px solid #678ca8;background:#fff;height:35px;line-height:18px;text-align:center;text-decoration:none;color:#6e93af;font-size:13px;font-weight:600;'>Feedback to Resellerratings</a></div>
</li> " ;
}
$GLOBALS['OrderReviewdHi'] = isc_html_escape($customer['custconfirstname']);
$emailTemplate->SetTemplate("order_status_email_PL");
}else{
$emailTemplate->SetTemplate("order_status_email");
}
第三步:添加了文件:/includes/classes/class.reviewpl.php和根目录下的:postreviewpl.php
/templates/__emails/下面添加了:order_status_email_PL.html,内容如下:
<html><body style="font-family: Arial; font-size: 12px;">
<div style="padding: 0 20px 0 20px;font-family:Tahoma;">
<div style="color:#6b9dba;margin:10px 0 15px 0;text-align:center;font-size:14px;"><span style="color:#969696;font-weight:500;">Hi </span>%%GLOBAL_OrderReviewdHi%%<span style="color:#969696;font-size:500;">,</span></div>
<p style="border-bottom: 1px dashed #d9d9d9;color:#656565;font-size:0.95em;margin:0 0 0 5%;padding:0 0 15px 0;line-height:20px;text-align:center;">how did this item meet your expectation? We would love your honest feedback on each of the items you purchased.</p>
<ul class="OrderItemList">
%%GLOBAL_AllLi%%
</ul>
</div>
</body>
</html>
PS:
1.邮件服务器会屏蔽js内容,没有查询到相关结果
2.没有验证码,产品评论不成功!?tab=ProductReviews
3.评论表单的功能修改PHP文件为:/includes/classes/class.reviewpl.php和根目录下的:postreviewpl.php
相关文章推荐
- Bigcommerce: 给已完成购买的客户发送一封产品评论邮件,让客户直接进行产品评论
- Bigcommerce:产品页面评论成功后直接定位到Review选项卡处
- C#实现.Net对邮件进行DKIM签名和验证,支持附件,发送邮件签名后直接投递到对方服务器(无需己方邮件服务器)
- JavaMail进行发送邮件步骤
- Java Mail(二):JavaMail介绍及发送一封简单邮件
- CSDN的BLOG评论和联系作者发送邮件好象有问题,请管理员解决
- Android JavaMail介绍及发送一封简单邮件
- 写一个实现用户注册时,向其邮箱发送激活码邮件,并进行状态处理。
- Gcoge.Com(Bindeng.Com) 环球酷哥Gcoge.Com全称Global Client Output in Googolplex Enterprise -- 可实现以Googolplex级数量向全球客户进行产品(产量,信息量)输出的e网企业
- 使用JavaMail进行邮件的发送
- 邮件发送组件的开发完成
- Bigcommerce系统:后台mark shipped添加自定义发货方式选项,并在客户Order邮件中online track在线查询单号
- 电报加密 描述: 发送电报保密是一项重要的工作,尤其是在军事领域,所以,为了安全的需要常常会对发送的内容进行加密,然后,接收方再进行解密,这样就达到了安全的需要。 本次我们完成一个简单的对字母加密程
- Javamail调用office365进行邮件发送
- Linux系统下使用mail发送一封简单的Internet邮件【以及验证邮件是否发送成功sendmail -bp,必须是root用户才可以使用此命令查看邮件消息队列中的内容】
- 利用PHPMailer 进行邮件发送
- 实现用户注册时,向其油箱发送激活码邮件,并进行状态处理
- Gcoge.Com(Bindeng.Com) 环球酷哥Gcoge.Com全称Global Client Output in Googolplex Enterprise -- 可实现以Googolplex级数量向全球客户进行产品(产量,信息量)输出的e网企业
- 采用Mutt及msmtp配置进行邮件发送
- ssh+jmail实现,注册完发送邮件,点击链接之后完成注册。