Support Forums

Renewal question

This is a discussion on Renewal question within the Technical Support forums, part of the Technical Support Forums category; How does this script manage sending out the Email X number of days before the ad expires? how the system ...


Go Back   68 Classifieds Forums > Technical Support Forums > Technical Support

This topic is resolved.

If you have a similar issue that this thread does not address, open a new related support topic.

 
Thread Tools Display Modes
Old 03-22-2009, 05:27 PM   #1
Senior Member
 
hel68c's Avatar
 
Join Date: Jun 2008
Location: Canada, Quebec
Posts: 284
Rep Power: 17
hel68c is just really nice hel68c is just really nice
Default Renewal question

How does this script manage sending out the Email X number of days before the ad expires?

how the system know when to send the signal to execute this script?
__________________
Serge
HobbyClassified.com
V4.08 Developper, Module installed (CIV Scam Filter, Maffo Location System, Maffo News,Youtube, Seller Store)
hel68c is offline  
Old 03-22-2009, 08:55 PM   #2
68 Classifieds Staff
 
Eric Barnes's Avatar
 
Join Date: Mar 2006
Location: Belmont, NC
Posts: 5,467
Rep Power: 130
Eric Barnes is just really nice Eric Barnes is just really nice
Default

It uses the file includes/cron.php which determines when emails should be sent and when listings should be deleted.

It knows by using the current date and subtracting x number of days to get ones that need to be emailed.
__________________
Eric Barnes
68 Classifieds Developer
Customer Area | Issue Tracker | Documentation | 68C Mods | 68 @ Twitter | My Modules
Eric Barnes is offline  
Old 03-23-2009, 09:49 AM   #3
Senior Member
 
hel68c's Avatar
 
Join Date: Jun 2008
Location: Canada, Quebec
Posts: 284
Rep Power: 17
hel68c is just really nice hel68c is just really nice
Default

As I understand in the script cron.php, it compares the expiration date of the ads less the number of days to expire with today date and sends an e-mail

It executes this script once a day.

So the customer receives a single email once for renewal.

Is this the way it works?

I ask this information because I work with two languages on my site and I wonder how I have to tell him to send an email in a specific language.
__________________
Serge
HobbyClassified.com
V4.08 Developper, Module installed (CIV Scam Filter, Maffo Location System, Maffo News,Youtube, Seller Store)
hel68c is offline  
Old 03-23-2009, 09:51 AM   #4
68 Classifieds Staff
 
Eric Barnes's Avatar
 
Join Date: Mar 2006
Location: Belmont, NC
Posts: 5,467
Rep Power: 130
Eric Barnes is just really nice Eric Barnes is just really nice
Default

Yes. It runs once a day and if it emails them then it updates the listing table and marks that listing that it has been sent.

I am not sure how you could determine which language it was written in. Maybe use the category.
__________________
Eric Barnes
68 Classifieds Developer
Customer Area | Issue Tracker | Documentation | 68C Mods | 68 @ Twitter | My Modules
Eric Barnes is offline  
Old 04-03-2009, 08:41 AM   #5
Senior Member
 
hel68c's Avatar
 
Join Date: Jun 2008
Location: Canada, Quebec
Posts: 284
Rep Power: 17
hel68c is just really nice hel68c is just really nice
Default

I noticed that the renewal notification is not reset.

The field notified remain to Y.

Do you have any advise?
__________________
Serge
HobbyClassified.com
V4.08 Developper, Module installed (CIV Scam Filter, Maffo Location System, Maffo News,Youtube, Seller Store)
hel68c is offline  
Old 04-03-2009, 10:08 AM   #6
Senior Member
 
hel68c's Avatar
 
Join Date: Jun 2008
Location: Canada, Quebec
Posts: 284
Rep Power: 17
hel68c is just really nice hel68c is just really nice
Default

I'm looking at the code and I noticed that the function that puts notified to 'N' is the function updateNotification.

PHP Code:
    function updateNotification($orderid)
    {
        global 
$db;
        
$sSQL="UPDATE ".PREFIX."listings SET notified='N' WHERE orderID=".$orderid;
        
$db->query($sSQL);
echo 
"update notification & orderid= ".$orderid
I placed an echo to look at the $orderid variable and it return 773.

This is the last order number that I did. This number does not appear in the listings of the ad. The number that appear in the field orderID in listing Table is 237 (the first order number)

So the function can't update the listings.
__________________
Serge
HobbyClassified.com
V4.08 Developper, Module installed (CIV Scam Filter, Maffo Location System, Maffo News,Youtube, Seller Store)
hel68c is offline  
Old 04-03-2009, 10:53 AM   #7
68 Classifieds Staff
 
Eric Barnes's Avatar
 
Join Date: Mar 2006
Location: Belmont, NC
Posts: 5,467
Rep Power: 130
Eric Barnes is just really nice Eric Barnes is just really nice
Default

In your signature it shows as v4.0.8 so I would recommend downloading v4.0.9 and then replacing these template files:
user/userbrowselistings.tpl
renew/ - every file in this folder.
__________________
Eric Barnes
68 Classifieds Developer
Customer Area | Issue Tracker | Documentation | 68C Mods | 68 @ Twitter | My Modules
Eric Barnes is offline  
Old 04-03-2009, 11:57 AM   #8
Senior Member
 
hel68c's Avatar
 
Join Date: Jun 2008
Location: Canada, Quebec
Posts: 284
Rep Power: 17
hel68c is just really nice hel68c is just really nice
Default

I replace the new 4.09 step1.tpl step2.tpl and userbrowselisting.tpl with the old version 4.08 and samething, the notified field can't be reset to 'N'
__________________
Serge
HobbyClassified.com
V4.08 Developper, Module installed (CIV Scam Filter, Maffo Location System, Maffo News,Youtube, Seller Store)
hel68c is offline  
Old 04-03-2009, 12:36 PM   #9
Moderator
 
juven14's Avatar
 
Join Date: Mar 2006
Location: Texas
Posts: 1,998
Rep Power: 60
juven14 is a jewel in the rough
Default

Did you upgrade to 4.0.9 or just copy over those template files?
__________________
John Snyder
PHP Developer
juven14 is offline  
Old 04-03-2009, 12:51 PM   #10
Senior Member
 
hel68c's Avatar
 
Join Date: Jun 2008
Location: Canada, Quebec
Posts: 284
Rep Power: 17
hel68c is just really nice hel68c is just really nice
Default

I just copy the files.

I made too many changes to the files to copy all 4.09.
__________________
Serge
HobbyClassified.com
V4.08 Developper, Module installed (CIV Scam Filter, Maffo Location System, Maffo News,Youtube, Seller Store)
hel68c is offline  
Closed Thread

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Renewal Settings free2take Technical Support 7 10-10-2008 10:17 AM
Renewal Email afrederc Technical Support 3 10-09-2008 04:38 PM


All times are GMT -4. The time now is 01:49 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0