tatty Posted May 29, 2008 Share Posted May 29, 2008 Can anybody help with this? I'm trying to get some kind of sales report that includes data on which attributes are selling best, something like: May's sales Gem Necklace - red - 2 Gem Necklace - blue - 6 I've got Product Attributes - Option Type Feature installed (which works great!) and I already installed two reports contributions, Monthly Sales Report and Sales Report 2. These are both useful in their different ways, and Sales Report 2 comes REALLY close to what I want, but doesn't give me figures for sales of attributes. I think the code in Sales Report 2 that needs tweaking to fit in with Option Type is this: // query for attributes $this->queryAttr = "SELECT sum(op.products_id) as attr_cnt, o.orders_id, opa.orders_products_id, opa.products_options, opa.products_options_values, opa.options_values_price, opa.price_prefix from " . TABLE_ORDERS_PRODUCTS_ATTRIBUTES . " opa, " . TABLE_ORDERS . " o, " . TABLE_ORDERS_PRODUCTS . " op WHERE o.orders_id = opa.orders_id AND op.orders_products_id = opa.orders_products_id"; I can post bits of code from Option Type if that would be helpful. It would be so great to be able to see this info at a click! Tatty Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.