 | |  | | | Classifieds How do I...? Wondering how to do something in Classifieds? |
September 17th, 2011, 04:22 PM
|
#1 (permalink)
| | Senior Member Verified Customer
Join Date: Oct 2003 Location: Ottawa, Canada
Posts: 833
| Items sold stats
This is more of a "how does it work" question rather than "how do I". The items sold stats on the main index page, are they updated when an item is marked as sold or when the cron removes the listing? I've had a few things marked as sold within the past day or two but my totals didn't change. Just wondering if I've messed up the process or if it will update when the ads are deleted.
- Bryan Ex
|
| |
September 17th, 2011, 04:26 PM
|
#2 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,940
|
it should only be sold items. There is no code anywhere else to update stats other than an item being sold or relisted.
|
| |
September 17th, 2011, 04:34 PM
|
#3 (permalink)
| | Senior Member Verified Customer
Join Date: Oct 2003 Location: Ottawa, Canada
Posts: 833
|
Okay... so it should be effective as soon as a user clicks on Sold. I must have something messed up then. Do you know off-hand if that query is in pp-inc or showproduct?
|
| |
September 17th, 2011, 06:56 PM
|
#4 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,940
|
No not if your cache the information on the index.
|
| |
September 18th, 2011, 10:34 AM
|
#5 (permalink)
| | Senior Member Verified Customer
Join Date: Oct 2003 Location: Ottawa, Canada
Posts: 833
|
I noticed that sold ads were still being displayed well after the 3 days I had specified in admin and these are the same ads that did not update the stats. I checked out the products table in my database and it appears the status time stamps have been exceeded. I'm guessing that's the date used for how long to display sold ads so I tried to hit cron.php directly with my browser. Cron.php produced the following error based on checking expiring auctions which I have disabled; Fatal error: Call to undefined function ppmysql_query() in /home/stoneb6/public_html/sugarbush.info/Test/cron.php on line 29
Removing the auction code in cron.php only bounced the same error further down the page to check for expiring ads.
My question is if the error is because cron.php was not called from another script page or should I be able to run it from my browser? I haven't found any way to run it manually from the admin panel unless it's included in another function.
|
| |
September 18th, 2011, 10:39 AM
|
#6 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,940
|
You can not try running cron.php yourself that is designed to run inline in the actual page
sendnnotice.php is the one designed to be run standalone
sold ads will only appear the x number of days you specify in admin look in showcat.php Code: Content visible to verified customers only.
$cutoffdate = time() - (($Globals['numdays'] * 24) * 3600); Code: Content visible to verified customers only.
Basically only ads where status is greater than cutoff or status equals 0 would be shown on showcat.
|
| |
September 18th, 2011, 11:49 AM
|
#7 (permalink)
| | Senior Member Verified Customer
Join Date: Oct 2003 Location: Ottawa, Canada
Posts: 833
|
I'm getting closer to figuring this out. Based on your info above I took a closer look at the database entries and noticed that every ad that had been marked as sold has the exact same time stamp. I posted a new ad and immediately marked it as sold. Here's where things change. The status for every sold item was updated to the time I marked my ad as sold. That's why my ads are not being removed. Every time an ad is tagged as sold the time of sale is being updated for all ads.
|
| |
September 18th, 2011, 12:31 PM
|
#8 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,940
|
what software version are you using?
I am able to mark an an ad sold and other ads are not updated. In editproduct.php under the sold portion the queries are very specific in the where clause it only updates that specific ads information not all ads.
If you want me to look at your code you can send us site info. I am not able to replicate your issue.
|
| |
September 18th, 2011, 04:20 PM
|
#9 (permalink)
| | Senior Member Verified Customer
Join Date: Oct 2003 Location: Ottawa, Canada
Posts: 833
| Quote:
Originally Posted by Chuck S what software version are you using?
I am able to mark an an ad sold and other ads are not updated. In editproduct.php under the sold portion the queries are very specific in the where clause it only updates that specific ads information not all ads.
If you want me to look at your code you can send us site info. I am not able to replicate your issue. | According to my download it should be version 4.2 but I do have various version numbers quoted throughout the scripts and database. What do you need for site info? Admin login, database, ftp, all of these?
Thanks,
Bryan
|
| |
September 18th, 2011, 04:25 PM
|
#10 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,940
|
I would need an admin login and ftp info and those could be sent through the contact us link in our header.
|
| |
September 20th, 2011, 04:11 PM
|
#11 (permalink)
| | Senior Member Verified Customer
Join Date: Oct 2003 Location: Ottawa, Canada
Posts: 833
| Quote:
Originally Posted by Chuck S In editproduct.php under the sold portion the queries are very specific in the where clause it only updates that specific ads information not all ads. | Okay, I believe this is the query is it not? Code: Content visible to verified customers only.
Now if I read this correctly shouldn't both the enddate and status have the timestamp of when a product is marked as sold? What is happening on my both my test and live installs is the status for all sold products is updated the same and the enddate does not change.
Just to confirm, site info was sent as requested earlier but let me know if it was not received.
- Bryan
|
| |
September 20th, 2011, 06:12 PM
|
#12 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,940
|
right this is the query but as that query shows marking an item sold only marks that specific item not all.
|
| |
September 20th, 2011, 06:22 PM
|
#13 (permalink)
| | Senior Member Verified Customer
Join Date: Oct 2003 Location: Ottawa, Canada
Posts: 833
|
Should the endate be modified as well and is it possible to have an error in the $sold variable? I have two installs with the same behavour - my modified live version and an unused stock version direct from the PP download section from mid August.
|
| |
September 20th, 2011, 06:40 PM
|
#14 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,940
|
yes the enddate and status should be changed and I already tested this works fine.
the sold function in that file would only run if a numeric sold variable exists. There is no way as I have stated before than the query can change every single ad.
|
| |
September 20th, 2011, 06:52 PM
|
#15 (permalink)
| | Senior Member Verified Customer
Join Date: Oct 2003 Location: Ottawa, Canada
Posts: 833
| Quote:
Originally Posted by Chuck S yes the enddate and status should be changed | Okay, my enddate does not change. Quote:
Originally Posted by Chuck S I already tested this works fine. | Well... I have two installs from the past four weeks that indicate otherwise so what I'm going to do is delete my test install and start from the beginning with new files I just downloaded right now. I will need a bit of time to set up and test but if I can duplicate the problem I will update here as it will be confirmed the problem is with the script. If I can not duplicate it then I will need to compare files to find what is different or what has changed. As Arnold would say... I'll be back. |
| |
September 20th, 2011, 07:00 PM
|
#16 (permalink)
| | Senior Member Verified Customer
Join Date: Oct 2003 Location: Ottawa, Canada
Posts: 833
|
Before I delete everything I thought I would share this...
|
| |
September 20th, 2011, 08:15 PM
|
#17 (permalink)
| | Senior Member Verified Customer
Join Date: Oct 2003 Location: Ottawa, Canada
Posts: 833
|
I downloaded the classifieds from PhotoPost tonight. Created a brand new database, uploaded files, installed and configured, then posted 10 test ads. I then marked the first five as sold and guess what? All status time stamps are exactly the same based on the last one marked as sold. You may want to update your test site to the current download because despite your earlier tests this is a confirmed bug with the script. Screen cap of the newly created database entries attached.
|
| |
September 21st, 2011, 08:00 AM
|
#18 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,940
|
Bryan I am using the latest code and like I said there is no way that query would do what your saying. I have done what your doing already and its fine. That action can not and does not do that. You have something else going on. I said I would look at your site if you want.
The WHERE clause tells what ad to update. If the sold variable was empty the entire section of code would not run and you would get a mysql error trying to run that query without a sold variable try it yourself in phpmyadmin.
|
| |
September 21st, 2011, 06:44 PM
|
#19 (permalink)
| | Senior Member Verified Customer
Join Date: Oct 2003 Location: Ottawa, Canada
Posts: 833
| Quote:
Originally Posted by Chuck S You have something else going on. I said I would look at your site if you want. | Stranger things have happened I suppose. Site info sent again tonight.
|
| |
September 21st, 2011, 08:03 PM
|
#20 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,940
|
yep no problem when I get to work in the am I will take a look.
|
| | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | | | | Thread Tools | | | | Display Modes | Rate This Thread | Linear Mode | |
Posting Rules
| You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is Off | | | All times are GMT -5. The time now is 11:23 PM. | |