在Magento中区分后端购买与前端购买 [英] Differentiating Backend vs. Frontend Purchases in Magento

查看:80
本文介绍了在Magento中区分后端购买与前端购买的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有办法判断订单是通过网站的前端发出还是通过管理面板输入?

Is there a way to tell if an order was placed through the frontend of the web site or entered through the administrative panel?

推荐答案

默认情况下,Magento仅将remote_ip存储在表sales_flat_order中用于由客户下达的订单(而管理订单设置为null).

By default, Magento only stores the remote_ip in table sales_flat_order for an order that is place by customer (while admin order is set to null).

所以尝试一下:

if(!empty($order->getRemoteIp()){
  //place online
}
else{
  // place by admin
}

请参见以编程方式区分admin和客户下达的订单

这篇关于在Magento中区分后端购买与前端购买的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆