This is a discussion on Product sold per Month/Year within the New osCommerce Contributions forums, part of the osCommerce 2.2 Forums category; Hi, I had a problem where I was always having zeros in all the results, whichever products was chosen. Added ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
|
#1
| ||||
| ||||
| Hi, I had a problem where I was always having zeros in all the results, whichever products was chosen. Added at the beginning of the file stats_products_per_month.php (this will get the product chosen variable when you click on Submit): if ($HTTP_GET_VARS['prod_num']) $prod_num_chosen = tep_db_prepare_input($HTTP_GET_VARS['prod_num']); just after: if ($jahr_end == 0) { $jahr_end = date("Y"); } Also changed the variable:$prod_num to be $prod_num_chosen in the line: $products_query_raw = "select op.products_id, op.products_model, op.products_name, sum(op.products_quantity) as quantitysum , sum(op.products_price*op.products_quantity)as gross FROM " . TABLE_ORDERS . " as o, " . TABLE_ORDERS_PRODUCTS . " AS op WHERE op.products_id='$prod_num_chosen' AND o.date_purchased BETWEEN '" . $start_date . "' AND '" . $end_date . " 23:59:59' AND o.orders_id = op.orders_id GROUP BY op.products_id"; Then when I choose a product and click Submit, it shows the results. Hope this helps, Pierre Forget More...
__________________ Michael Sasek osCMax Developer
|
| Thread Tools | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Product sold per Month/Year | michael_s | New osCommerce Contributions | 0 | 01-14-2007 04:00 AM |
| Product sold per Month/Year | michael_s | New osCommerce Contributions | 0 | 01-11-2007 12:55 AM |
| Product sold per Month/Year | michael_s | New osCommerce Contributions | 0 | 01-09-2007 05:46 PM |
| Extra Box on Top of New Product of the Month | jimmyliu | osCommerce 2.2 Modification Help | 0 | 04-14-2005 05:23 AM |
| Paid Subscription Product Type (1 day, 1 wk, 1 mo, 1 year) | author20 | osCommerce 2.2 Modification Help | 0 | 02-24-2003 04:43 AM |