Support Forums - Classified Ads Script Osclass
General osclass questions => General discussion => Topic started by: dsf on May 06, 2021, 09:18:38 AM
-
Hello.
Last weekend i upgraded from 3.9 to 4.4, all went well. Great update, i must say.
I have one issue. It seems that no renew email is send out. To test this, i created a demo account, made a short period category and waited. Until today, i got no email. While the ad expires on 9th and i have set it to email 7 days before, i got nothing.
CRON runs great, no issues there.
Is there a way to LOG each renew email send or some info about the renew function when run? Or debug this somehow?
Thanks
-
Are you using built-in osclass solution? Do you have mail template created?
-
Hello.
Just got the email to renew!!.
Still i can't find a way to renew it.
Yes i use the build in function. NO i have nothing created. If there any guide on what i must do?
Many thanks !
-
@dsf
Basically you must have email template created I think. If you check installation files.
INSERT INTO /*TABLE_PREFIX*/t_pages (pk_i_id, s_internal_name, b_indelible, dt_pub_date) VALUES (22, 'email_warn_expiration', 1, NOW() );
INSERT INTO /*TABLE_PREFIX*/t_pages_description (fk_i_pages_id, fk_c_locale_code, s_title, s_text) VALUES (22, 'en_US', '{WEB_TITLE} - Your ad is about to expire', '<p>Hi {USER_NAME},</p><p>Your listing <a href="{ITEM_URL}">{ITEM_TITLE}</a> is about to expire at {WEB_LINK}.');
/*TABLE_PREFIX*/ Should be changed to your prefix (in config.php) and run on database.
-
What i have is:
email_warn_expiration {WEB_TITLE} - Your ad is about to expire
If you mean that, yes i have it. But HOW do i renew?
-
@dsf
In user account, check sigma theme for reference
<?php if(osc_item_can_renew()) { ?>
<a href="<?php echo osc_item_renew_url();?>" ><?php _e('Renew', 'sigma'); ?></a>
<?php } ?>
-
ok, does the link in MY ACCOUNT appears AFTER the expiration date or when the email is send to the user?
I mean if the email is sent 2 days before the expiration, when that link is appearing?
Or it is there ALWAYS? because right now i seen no such option with Sigma.
-
Ok, i see this is an issue with OsclassWizards theme i use. With Sigma it shows ok.
I will see if i can modify our theme, to work with this, following Sigma example. I'm not a coder, but i think i can do that.
If not, we will see ..
many thanks
-
@dsf
Listing can be renewed once it is expired.
-
I was able to resolve this by looking at the Sigma example you told me to.
MANY thanks, appreciated.
-
No problem, do you mean adding link to user items right?
-
No problem, do you mean adding link to user items right?
Yes. adding a Renew, next to Edit Item and Delete.
I was able to modify my theme, accordingly to Sigma code. With a little change since the files are named differently.
-
Cool, thanks for details :)
-
If anyone is interested and uses OsclassWizard theme, here is how to ADD Renew:
Add to loop-user-list.php file the following code, around line 190 (approximatelly since i have many changes done myself to the code):
<?php if(osc_item_can_renew()) { ?>
<span>|</span>
<a href="<?php echo osc_item_renew_url();?>" ><?php _e('Renew', OSCLASSWIZARDS_THEME_FOLDER); ?></a>
<?php } ?>
Also do this to the loop-user-grid.php.
-
Hello.
I was informed by some users that the Renew option leads to a 404 page. I was able to verify this, while Edit and Delete work very well.
Then i switched from my Theme to the default of yours. And same thing happened.
ANY ideas why a 404 is appearing? In my stage test it worked right. And the "link" of Renew looks right.
ANY ideas or hints would help on what to look for.
Many thanks
-
@dsf
If you upgraded, you must go to permalinks settings in oc-admin and simply re-save them.
Make sure that all links looks good.
-
@dsf
If you upgraded, you must go to permalinks settings in oc-admin and simply re-save them.
Make sure that all links looks good.
Well i did and also Delete and Edit permalinks show and work ok, so it is not a permalinks issue.
Renew and PHP 8 was a major reason i upgraded (because of short ads duration i use, 7-30 days), i will try to figure this out ...
-
@dsf
If you see 404, it is not going to be related to PHP
-
@dsf
If you see 404, it is not going to be related to PHP
Got it, thanks.
It is not easy to test the Renew feature (as you already know). I will have to wait at least a day (or two) to see and test.
If i find something related to 4.4 i will update.
-
@dsf
As I mentioned before, permalinks should be re-saved. Everything will look ok there, but once you press save button, it is going to generate something like string/key osclass used for links decoding.
-
@dsf
As I mentioned before, permalinks should be re-saved. Everything will look ok there, but once you press save button, it is going to generate something like string/key osclass used for links decoding.
My mistake. Indeed it works after saving permalinks.
Sorry for the trouble.
-
Cool
-
Am asking much but is there any way for the Admin to Renew an expired ad?
I mean when you have Delete, Deactivate, Mark as etc etc, can i somehow put also Renew in there?
Thanks
-
Not for now, will consider thst.
-
Not for now, will consider thst.
Thank you !
-
It seems that the Renew doesn't work well. Not always at least. I have tried to find out under what circumstances it doesn't (replicate it) but failed. Sometimes it works, some not.
And it is NOT an issue with email, since Cpanel track delivery doesn't show ANY failed emails. The emails are just NOT sent. Neither a CRON issue.
Please take the time to check this when you can.
Thanks
-
@dsf
So only emails are not being sent?
-
@dsf
So only emails are not being sent?
Yes but sometimes. Not always and i'm unable to locate the source of the issue.
-
@dsf
What is name of email template?
-
@dsf
What is name of email template?
email_warn_expiration
-
@dsf
Found this code in cron, not sure if it is ok to be in hourly cron
if(is_numeric(osc_warn_expiration()) && osc_warn_expiration()>0) {
$items = Item::newInstance()->findByHourExpiration(24*osc_warn_expiration());
foreach($items as $item) {
osc_run_hook('hook_email_warn_expiration', $item);
}
}
-
You mean the Hourly calculations can sometimes be off? Is that what you mean? It should be Daily?
-
@dsf
I never studied this part of code and how it works, maybe will look on it in 4.5
-
Does anybody know if the Admin account gets an email when an ad is Renewed?