- 浏览: 71979 次
- 性别:
- 来自: 上海
最新评论
获得指定customer 购买的产品信息,如果是configurable的,则取configurable的名字。
$orderedProductsForCustomerData = array(); $orderTable =Mage::getSingleton('core/resource')->getTableName('sales/order'); $orderItemTable = Mage::getSingleton('core/resource')->getTableName('sales/order_item'); $orderedProductsForCustomers = Mage::getModel('sales/order_item')->getCollection(); $orderedProductsForCustomers->getSelect()->reset('columns'); $orderedProductsForCustomers->getSelect()->columns('name'); $orderedProductsForCustomers->getSelect()->columns('item_id'); $orderedProductsForCustomers->getSelect()->columns('parent_item_id'); $orderedProductsForCustomers->getSelect()->joinInner( array('orders'=>$orderTable), 'main_table.order_id = orders.entity_id', array('product_id'=>'main_table.product_id') ); $orderedProductsForCustomers->getSelect()->joinLeft( array('self_table'=>$orderItemTable), 'main_table.parent_item_id = self_table.item_id', array() ); $orderedProductsForCustomers->getSelect()->where('orders.customer_id=?',$customerId); $orderedProductsForCustomers->getSelect()->where('orders.state=?','complete'); $orderedProductsForCustomers->getSelect()->where('main_table.product_id not in (?)',$reviewedProductIds); $orderedProductsForCustomers->getSelect()->where('main_table.parent_item_id is null'); $orderedProductsForCustomers->getSelect()->distinct(); Mage::log($orderedProductsForCustomers->getSelect().''); try{ $orderedProductsForCustomerData = $conn->fetchAll($orderedProductsForCustomers->getSelect()); } catch (Exception $e){ Mage::logException($e); }
发表评论
-
Magento随机生成sales rule的coupon code
2013-01-02 22:09 2228在Magento中可以使用SalesRule模块下的Mage_ ... -
Magento 后台配置中实现日期选择 (Date picker)
2012-12-28 15:07 2460首先,创建一个新的Form Field 类: <?p ... -
将缺货产品放在产品列表后面
2011-12-10 20:50 1363Rewrite Mage_Catalog_Model_Laye ... -
Mac Lion上安装配置Nginx PHP PHP-FPM
2011-12-10 16:01 7993<!--?xml version="1.0&q ... -
How to customize Magento as CMS system (1.5.0 CE)
2011-03-06 22:42 1023Before install: 1. Go to app/et ... -
How to redirect to another url in block or template
2011-02-25 13:47 1092In Block class: public funct ... -
Use call back function to proccess Magento large collection
2011-01-19 12:58 912$orders = Mage::getModel('sal ... -
How to remove unnecessary columns in Magento collection
2011-01-19 12:56 1086$orders = Mage::getModel('sal ... -
How to calculate currency according to reward points rate in Magento
2011-01-13 18:03 1288$rate = Mage::getModel('enter ... -
Magento二次开发的利器:Rewrite
2010-12-08 17:15 2703Magento是一个十分优秀的电子商务系统,但是有时候我们需要 ... -
增加Magento后台管理功能三:在后台设置(System/Configuration)中加入自定义设置
2010-11-30 16:17 1946在模块的etc目录下新建system.xml配置文件,内容如下 ... -
增加Magento后台管理功能二:开发后台Controller
2010-11-30 16:02 2682在模块的controllers目录下创建Adminhtml目录 ... -
增加Magento后台管理功能一:在后台管理界面加入菜单
2010-11-30 15:47 4492在模块的etc目录下增加adminhtml.xml配置文件,用 ... -
Magento在CMS Page中增加用户信息变量
2010-11-26 10:14 2798Magento的cms页面和static block页面中可以 ... -
Magento根据不同的浏览器自动切换package或 theme
2010-11-26 10:05 2027在后台设置中: System > Configurat ... -
Magento让后台数据列表中的action列链接在新窗口打开
2010-11-08 16:56 1126'actions' => array( ... -
Maegen获得后台当前用户的信息
2010-11-08 16:53 839$admin = Mage::getSingleton(' ... -
Magento中用子类替换Block
2010-10-15 10:47 1822Step 1:创建一个新的Module Step 2: 编辑模 ... -
Magento中添加带有选项的属性
2010-10-14 14:49 1417下面的代码为Customer实体添加了性别属性,有两个可选值 ... -
Magento为后台用户保存操作日志(企业版)
2010-09-19 17:00 2728protected function _logAdm ...
相关推荐
该数据集包含1个文件: WA_Fn-UseC_-Telco-Customer-Churn.csv 包含客户注册的服务、账户信息、统计信息等,可以分析所有相关的客户数据并制定有针对性的客户保留计划
开发工具 customer开发工具 customer开发工具 customer开发工具 customer开发工具 customer开发工具 customer开发工具 customer开发工具 customer开发工具 customer开发工具 customer开发工具 customer开发工具 ...
Telco-Customer-Churn.csv 来源 https://github.com/ibm/telco-customer-churn-on-icp4d 这数据是原作者处理过的,没有包含所有特征,但可以用来训练一下模型
该数据集包含表示客户购买行为的模拟数据。它包括各种功能,例如年龄、性别、收入、教育程度、地区、忠诚度状态、购买频率、购买金额、产品类别、促销使用情况和满意度分数。
(For Customer) iMaster NetEco 产品文档(数据中心)(V600R022C10_01)(HDX)
数据挖掘是信息领域发展最快的技术,很多不同领域的专家,比如统计家、数据库专家等,都从中获得了发展的空间,使得数据挖掘日益成为企业界讨论的热门话题。随着信息技术的发展,人们采集数据的手段日益丰富与高明,...
customer-transactions.csv用户转化数据
CRM_Customer.
tend to view the customer service function of their business as little more than a necessary nuisance. That strikes me as paradoxical. Companies that spare no expense to build their brands, improve ...
本资源包括两个部分,一是某电商软件用户行为源数据,二是基于源数据对消费者的一些分析,包括浏览、加购、购买的行为分析、时段分析,品类分析等,输出的数据分析结果 Field Type Definition customer_id Bigint ...
客户购物偏好数据集提供了有关消费者行为和购买模式的宝贵见解。了解客户偏好和趋势对于企业定制产品、营销策略和整体客户体验至关重要。 本数据集捕捉了广泛的客户属性,包括年龄、性别、购买历史、首选支付方式、...
The easy way to grasp customer analyticsEnsuring your customers are having positive experiences with your company at all levels, including initial brand awareness and loyalty, is crucial to the ...
t_customer.sql是从数据库中导出的表的sql脚本,大家可以使用这个脚本生成数据表,以供实验使用,也可以自己根据表结构创建表
SAP Customer Service PPT
数据约束: 指定与任务相关的数据集 Find product pairs sold together in Vancouver in Dec.’98. 维/层次约束:指定所用的维或概念结构中的层 in relevance to region, price, brand, customer category. 规则约束...
Customer Presentation for G7 Customer Presentation for G7 Customer Presentation for G7
2022年泰迪杯B题题目和数据,由于要者自取。 其中包括一个pdf文件,三个CSV文件。
Think Like Your Customer - Bill Stinnett
Customer Segmentation and Clustering using SAS EM
Customer.class