Questions tagged «magento-1.7.0.1»

3
如何通过客户ID获取最近查看的产品?
我想通过SOAP WS公开客户最近查看的项目。 我如何到达那些物品?我知道它们存储在“ reports / product_index_viewed”中;但是,我不知道哪种方法是实现这些目标的正确方法。 这是到目前为止我得到的: public function getRecentlyViewedByCustomer($customerId) { Mage::log(__METHOD__); $customer = $this->_getCustomer($customerId); Mage::log('Getting recently viewed products of '. $customer->getName() .' ('. $customer->getEmail() .'), ID: ' . $customer->getId() ); $productCollection = Mage::getResourceModel('reports/product_index_viewed'); Mage::log(print_r($productCollection, true)); return __METHOD__; } public function _getCustomer($customerId) { $customer = Mage::getModel('customer/customer')->load($customerId); return $customer; }
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.