osCommerce and osCMax shopping cart software forums

Shopping Cart Software

osCommerce with teeth!

 
 

Out store ready to LIVE, we need to RESET best_products_purchased, but how ?

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 ...


Go Back   osCommerce and osCMax shopping cart software forums > osCMax v2.0 Forums > osCMax v2 Customization/Mods

Register FAQ Members List Calendar Mark Forums Read


Free community membership! Fast easy FREE membership
Reply

 

LinkBack Thread Tools
  #1  
Old 07-14-2007, 09:22 PM
New Member
 
Join Date: Jul 2007
Posts: 12
Thanks: 4
Thanked 0 Times in 0 Posts
Rep Power: 0
kepin is on a distinguished road
Default Out store ready to LIVE, we need to RESET best_products_purchased, but how ?

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 !
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
Advertisement
  #2  
Old 07-14-2007, 09:46 PM
Active Member
 
Join Date: Oct 2005
Location: wherever I happen to be at the moment
Posts: 461
Thanks: 4
Thanked 79 Times in 73 Posts
Rep Power: 7
met00 is just really nicemet00 is just really nicemet00 is just really nicemet00 is just really nicemet00 is just really nice
Default Re: Out store ready to LIVE, we need to RESET best_products_purchased, but how ?

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
The Following User Says Thank You to met00 For This Useful Post:
kepin (07-15-2007)
  #3  
Old 07-15-2007, 08:44 PM
New Member
 
Join Date: Jul 2007
Posts: 12
Thanks: 4
Thanked 0 Times in 0 Posts
Rep Power: 0
kepin is on a distinguished road
Default Re: Out store ready to LIVE, we need to RESET best_products_purchased, but how ?

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 !!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4  
Old 07-16-2007, 08:41 AM
Active Member
 
Join Date: Oct 2005
Location: wherever I happen to be at the moment
Posts: 461
Thanks: 4
Thanked 79 Times in 73 Posts
Rep Power: 7
met00 is just really nicemet00 is just really nicemet00 is just really nicemet00 is just really nicemet00 is just really nice
Default Re: Out store ready to LIVE, we need to RESET best_products_purchased, but how ?

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
Advertisement
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

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 08:03 AM
Anyone using 1.5 with a live store? Anonymous osCMax v1.7 Discussion 6 12-30-2003 09:29 PM
Almost ready to go live judoka osCommerce 2.2 Modification Help 6 06-02-2003 05:41 AM


All times are GMT -8. The time now is 07:49 AM.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO
http://www.oscmax.com/forums/
Copyright 2008 osCMax