Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Sales report including attributes


tatty

Recommended Posts

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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...