This is a discussion on Out store ready to LIVE, we need to RESET best_products_purchased, but how ? within the osCMax v2 Customization/Mods forums, part of the osCMax v2.0 Forums category; hi everyone, we are about to LIVE with our store and we need to reset everything to ZERO in the ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
|
#1
| |||
| |||
| hi everyone, we are about to LIVE with our store and we need to reset everything to ZERO in the admin area, such as : best products purchased, best products viewed. Anybody can tell me where can I reset it in mySQL Admin please ? thanks in advance ! |
|
#2
| |||
| |||
| table products zero out the products_ordered field how did I figure this out? The SQL query... $best_sellers_query = tep_db_query("select distinct p.products_id, pd.produc ts_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c where p.products_status = '1' and p.products_ordered > 0 and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and '" . (int)$current_category_id . "' in (c.categories_id, c.parent_id) order by p.products_ordered desc, pd.products_name limit " . MAX_DISPLAY_BESTSELLERS); see where it has the "order by"? That's the key.
__________________ so endith the lesson<think>sometimes I just sit's and thinks</think> "Here you are with a hand full of holes, a thumb up your ass, and a big grin to pass the time of day with." - TWB |
| The Following User Says Thank You to met00 For This Useful Post: | ||
kepin (07-15-2007) | ||
|
#3
| |||
| |||
| thanks met00 !! can you tell me the TABLE database of best_products_purchased ? I prefer to delete it one by one. I'm just worry I might screwed up with SQL query... thanks again !! |
|
#4
| |||
| |||
| I assume you are talking about the admin report... /admin/stats_products_purchased.php Let's look at the SQL... $products_query_raw = "select p.products_id, p.products_ordered, pd.products_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where pd.products_id = p.products_id and pd.language_id = '" . $languages_id. "' and p.products_ordered > 0 group by pd.products_id order by p.products_ordered DESC, pd.products_name"; AMAZING... this query looks a great deal like the best sellers query above! My first glance shows that the same table is being used. Whoa! it shows that the same filed in the same table is being used (see the "order by p.products_ordered"). Now, I'm no longer working as an aerospace engineer or a rocket scientist, but my best guess is that when you zero out that field in the database it will get rid of both the "best sellers" on the customer side and the "best sellers" report on the admin side. But, you know, I could be wrong, so you may just want to check out /admin/includes/database_tables.php and see if there is a special table there that duplicates what the products tables single field is doing. If there isn't, then my best guess is that the SQL statement isn't lying and that zeroing out the data from that one field will actually do what I said it would do in my last post. YMMV and do not fold, bend, spindle or mutilate this post.
__________________ so endith the lesson<think>sometimes I just sit's and thinks</think> "Here you are with a hand full of holes, a thumb up your ass, and a big grin to pass the time of day with." - TWB |
| Thread Tools | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Ready to go live but a couple of hang ups! Please Help! | n2advnture | osCommerce 2.2 Modification Help | 0 | 11-19-2005 09:03 AM |
| Anyone using 1.5 with a live store? | Anonymous | osCMax v1.7 Discussion | 6 | 12-30-2003 10:29 PM |
| Almost ready to go live | judoka | osCommerce 2.2 Modification Help | 6 | 06-02-2003 05:41 AM |