Magento中按类别销售? [英] Sales by Category in Magento?

查看:44
本文介绍了Magento中按类别销售?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们在Magento网站上有一个名为间隙"的类别.理想情况下,能够获得该类别中所有已售订单的报告会很好.

We have a category called "Clearance" on our Magento website. Ideally it would be nice to be able to get a report of all orders sold in that category.

反正我可以将订单集合与产品集合一起加入并按类别ID进行过滤吗?

Is there anyway I can join the orders collection with the products collection and filter by category id?

这里是一个类似的线程: http://www.magentocommerce.com/boards/viewthread/44296/

Here is a similar thread: http://www.magentocommerce.com/boards/viewthread/44296/

任何想法,还是我疯了?不一定要漂亮.

Any ideas, or am I crazy? It doesn't need to be pretty.

推荐答案

Magento中的所有订单数据都是特定于产品的.它不存储有关产品所属类别的任何信息.因此,正如您所发现的那样,Magento中没有此类报告.由于产品可能属于多个类别,这也使它具有挑战性.假设您拥有清仓商品"和其他类别的产品.您如何知道产品是从哪个类别购买的?(不能).

All order data in Magento is product-specific. It doesn't store anything about what category the products are in. So, as you have found out, there are no reports available in Magento for that sort of thing. It makes it challenging as well because of the fact that products can be in multiple categories. Let's say you have a product that is in 'Clearance' and another category. How can you know which category the product was purchased from? (You can't).

一种肮脏的做法是筛选所有订单,然后在每个产品上检查其是否属于清算"类别,就像您在订单集合"中提到的那样.

A dirty way to do it would be to sift through all of the orders, and on each product, check to see if it belongs to the 'Clearance' category, as you mentioned with the Order Collection.

不幸的是,这变得相当复杂,而且付出的努力可能确实不值得.

Unfortunately, this gets complicated rather quickly, and the effort may really not be worth the time.

这篇关于Magento中按类别销售?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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