Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Building a Custom Report


pafranklin

Recommended Posts

Hello,

 

I have been using and modifying OSC for a couple of years (although am not a proficient user just yet).

 

I would like to build a custom report which would show the following.....................

 

"Customer Name, Order date, Actual Product(s) ordered, Model number(s), Manufacturer (of each item), Order Total and current Status"

 

To be honest I am not entirely sure where to start so would be grateful if someone could point me in the right direction. There are a number of excellent reports and contribs out there but none that can provide all of this on a single page.

 

many thanks.

 

Paul.

You will never learn if you don't try. And boy am I trying....!

Link to comment
Share on other sites

I would like to build a custom report which would show the following.....................

 

"Customer Name, Order date, Actual Product(s) ordered, Model number(s), Manufacturer (of each item), Order Total and current Status"

 

The tricky part would be the manufacturer.

how critical is this field to your report ?

 

Corrie

Link to comment
Share on other sites

The tricky part would be the manufacturer.

how critical is this field to your report ?

 

Corrie

Hi (and thank you for taking the time and trouble to reply). I could manage without the manufacturer for a now but in thelong term this could be the most important part of it. So, if it is really tricky, I could manage without for now.

 

Any suggestions would be gratefully received!!.

 

Thank you.

 

Paul.

You will never learn if you don't try. And boy am I trying....!

Link to comment
Share on other sites

Hi (and thank you for taking the time and trouble to reply). I could manage without the manufacturer for a now but in thelong term this could be the most important part of it. So, if it is really tricky, I could manage without for now.

 

It's definitly tricky to include the manufacturer.

If you have an invoice with products from multiple manufacturers, then all products would simply default to the first manufacturer in your drop down list.

 

Also - do you expect the final price to be the final price for the *product* or per product ? or do you expect the final price to be the *total cost of the order* - shipping, taxes in, etc, etc, ?

 

Corrie

Link to comment
Share on other sites

It's definitly tricky to include the manufacturer.

If you have an invoice with products from multiple manufacturers, then all products would simply default to the first manufacturer in your drop down list.

 

Also - do you expect the final price to be the final price for the *product* or per product ? or do you expect the final price to be the *total cost of the order* - shipping, taxes in, etc, etc, ?

 

Corrie

To be honest I am less concerned about the Price. Ideally it would be the per product price but if difficult it could simply be the individual product items with just one "total" price.

You will never learn if you don't try. And boy am I trying....!

Link to comment
Share on other sites

Hi (and thank you for taking the time and trouble to reply). I could manage without the manufacturer for a now but in thelong term this could be the most important part of it. So, if it is really tricky, I could manage without for now.

 

Any suggestions would be gratefully received!!.

 

Thank you.

 

Paul.

How do you want this report laid out? Because the current order interface provides all of this already doesn't it? A query you could use to tie in manufacturers also though, would be something like this:

 

select o.customers_name, o.date_purchased, pd.products_name, p.products_model, m.manufacturers_name from " . TABLE_ORDERS . " o, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS . " p, " . TABLE_MANUFACTURERS . " m, " . TABLE_ORDERS_PRODUCTS . " op where op.orders_id = o.orders_id and op.products_id = p.products_id and op.products_id = pd.products_id and p.manufacturers_id = m.manufacturers_id and pd.language_id = '" . (int)$languages_id . "'

That should pull all of the data you're looking for, although you'll have a lot of duplicate entries on lines, such as the customer's name, which will be returned in every row for each individual product that makes up an order...

 

Richard.

Richard Lindsey

Link to comment
Share on other sites

To be honest I am less concerned about the Price. Ideally it would be the per product price but if difficult it could simply be the individual product items with just one "total" price.

 

 

Ok - hang on.

 

You want a *listing* of these content fields don't you ? Like - when you go into admin --> orders - the default page is a list of itmes.

You'd like to see :

"Customer Name, Order date, Actual Product(s) ordered, Model number(s), Manufacturer (of each item), Order Total and current Status"

displayed in the same format right ?

 

I'm just trying to be concise. So if you were veiwing this info in this format, you would have a single row for every order - and thus an individual product price displayed in each row.

 

So - If I placed 10 orders within one single session, there would be ten rows displayed in the report.

 

Correct ?

 

Corrie

Link to comment
Share on other sites

Hi Corrie, You are spot on!! That is exactly what I am trying to achieve, with the addition if at all possible of including the manufacturer of each item.

 

Hi Richard - Thanks for the suggestion on the query, as I would love to include the manufacturer if possible. I am quite happy to have potentially duplicate lines as in the majority of instances my customers seem to order one item at a time. Either way I can also then see each item and the manufacturer of that item.

 

Thank you both!! Any suggestions on how to pull this together would be fantastic!!

You will never learn if you don't try. And boy am I trying....!

Link to comment
Share on other sites

Hi Corrie, You are spot on!! That is exactly what I am trying to achieve, with the addition if at all possible of including the manufacturer of each item.

 

Hi Richard - Thanks for the suggestion on the query, as I would love to include the manufacturer if possible. I am quite happy to have potentially duplicate lines as in the majority of instances my customers seem to order one item at a time. Either way I can also then see each item and the manufacturer of that item.

 

Thank you both!! Any suggestions on how to pull this together would be fantastic!!

 

One last question :

Do you want to retain the original ouput and create a *new* link to display this data ?

or do you want this format to replace the existing code so it will be the default output whern you click on orders.php ?

 

Corrie

Link to comment
Share on other sites

One last question :

Do you want to retain the original ouput and create a *new* link to display this data ?

or do you want this format to replace the existing code so it will be the default output whern you click on orders.php ?

 

Corrie

Ideally I would go for a new page (probably to be called orders4.php). Thank you so much for the help.I am very grateful.

Paul.

You will never learn if you don't try. And boy am I trying....!

Link to comment
Share on other sites

Ideally I would go for a new page (probably to be called orders4.php). Thank you so much for the help.I am very grateful.

Paul.

 

Hey Paul - I think I got it.

 

Mail me at :

corrinarusso at gmail dot com

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...