Osclass Support Forums

Osclass theme support => Epsilon Osclass Theme => Topic started by: Tango on August 27, 2022, 02:54:13 PM

Title: Random Offer of the Day Issue
Post by: Tango on August 27, 2022, 02:54:13 PM
While doing some tests on a frinds' website, I've modified the internal Osclass hourly cron to run every minute and the Epsilon theme's function to do the same - osc_add_hook('cron_hourly', 'eps_manage_day_offer');
In the theme configuration, I've enabled the Offer of the Day, without selecting any item (let it run randomly).

Now, I noticed that the item doesn't change, even if the cron runs properly.
Based on my setup, every minute I should have a new Offer of the Day selected from the existing premium items.
For me, the item stays the same forever.

Can you please check on your side?
Thanks!
Title: Re: Random Offer of the Day Issue
Post by: MB Themes on August 27, 2022, 04:40:41 PM
Do you have latest version?
Title: Re: Random Offer of the Day Issue
Post by: mwindey on August 27, 2022, 04:46:02 PM
My cron runs minutely and changing offer off the day setting in functions.php is

Code: [Select]
osc_add_hook('cron_minutely', 'eps_manage_day_offer');

Minutely cron in DA panel is setup like:
*/1   *   *   *   *   php /home/u44173****/domains/mydomain.be/public_html/index.php -p cron -t minutely

changes every minute
Title: Re: Random Offer of the Day Issue
Post by: Tango on August 27, 2022, 06:31:30 PM
Do you have latest version?
This guy uses v1.1.0 as he has a heavily modified setup and didn't want to lose the changes.
However, in the changelog >1.1.0 I'm not seeing any entries related to this function.

I guess it must be the internal Osclass cron that is acting up somehow...
I will try with the external one.

Thanks!
Title: Re: Random Offer of the Day Issue
Post by: Tango on August 27, 2022, 11:25:16 PM
Back with some findings:

1. The internal cron (set to run every minute) definitely doesn't work with the Offer of the Day. This functionality seems to get skipped by the cron somehow.
Tested on both localhost and a live server, on both Osclass 3.8 and 8.0.2.

2. The external cron /usr/bin/php /home/user/public_html/index.php -p cron -t minutely doesn't seem to work either for me...

So weird.
I'll test some more and follow up.
Title: Re: Random Offer of the Day Issue
Post by: mwindey on August 27, 2022, 11:42:18 PM
I am using latest version and  latest epsilon... My own changes to css and some modifications. Now I changed the offer of the day to change every 5 minutes.... Check https://wirly.be
It works... Maybe something is wrong with host..
On my website offer of the day is called spotlight
Title: Re: Random Offer of the Day Issue
Post by: Tango on August 28, 2022, 12:31:38 AM
I am using latest version and  latest epsilon... My own changes to css and some modifications. Now I changed the offer of the day to change every 5 minutes.... Check https://wirly.be
It works... Maybe something is wrong with host..
On my website offer of the day is called spotlight
Indeed, on your setup it works fine.
I'll test some more tomorrow with the latest everything and on a clean setup.

Thanks for your feedback and congrats on your website. Looks crisp! 8)
Title: Re: Random Offer of the Day Issue
Post by: MB Themes on August 28, 2022, 08:49:58 AM
@Tango
Make sure admin did not defined any ID (day_offer_admin_id).

Otherwise theme will search for one premium item in following way:
Code: [Select]
    $mSearch = new Search();
    $mSearch->onlyPremium(true);
    $mSearch->order('RAND()', '');
    $mSearch->limit(0, 1);
    $aItems = $mSearch->doSearch();

You can run that even once per minute
Title: Re: Random Offer of the Day Issue
Post by: officela on November 09, 2022, 09:13:20 PM
can someone please help me how to setup the cron job?

i am using latest theme 1.1.9 with oscall 8.0.2 ( no modifications on theme or osclass )
i have disabled the Automatic cron process in osclass settings.

some messages up i read this : 
Code: [Select]
*/1   *   *   *   *   php /home/u44173****/domains/mydomain.be/public_html/index.php -p cron -t minutely
so i understood that the cron process should call the index.php

in my cpanel i have a cron jobs so i went created new one and replaced the path with mine... nothing.....

after i deleted the cron and tried with the osclass automatic cron process enabled.... again nothing....

any help please?

sometimes ( depending with my tests i get this on my email:
Code: [Select]
Status: 500 Internal Server Error
X-Powered-By: PHP/7.4.32
Content-type: text/html; charset=UTF-8
Title: Re: Random Offer of the Day Issue
Post by: MB Themes on November 14, 2022, 05:06:52 PM
@officela
Not all are used, I recommend to setup hourly, daily, weekly, until others are not specifically needed.
For error 500 you need details behind.
Title: Re: Random Offer of the Day Issue
Post by: officela on November 17, 2022, 06:02:41 PM
thanks for your answer yet not really helping me though  :'( :'( :'(
will open a ticket on my hosting company to assist me.

Can you please confirm me that i need the root index.php to call for this cron?    ( Sorry but i never had even the smallest experience with cron jobs  ( i want describe what i need as good as i can so that i believe they will help me out )

Title: Re: Random Offer of the Day Issue
Post by: MB Themes on November 19, 2022, 10:15:44 AM
Details are in docs:
https://docs.osclasspoint.com/cron-setup
Title: Re: Random Offer of the Day Issue
Post by: officela on November 19, 2022, 06:10:48 PM
Thanks,

Contacted my hosting service and they gave me 2 options:

curl https://www.*****.gr/index.php >/dev/null 2>&1

wget -O - https://www.*****.gr/index.php >/dev/null 2>&1


Yet the offer of the day does not change even though ( for test purposes) i selected to run once per minute...
I even tried out the Free site:  https://cron-job.org/
Again Nothing !

Now what ??? any idea ?

I feel helpless ! that's maybe the 20th time i am trying to make this work without success...  ( 1st 15 times i was doing all by the documentation and now that i contacted here and hosting company the same result )

Please feel free to help a little anyone who can do that :)
Title: Re: Random Offer of the Day Issue
Post by: officela on November 24, 2022, 08:59:16 AM
let's i ask different then.

How many of you managed to make it work and how ????
Title: Re: Random Offer of the Day Issue
Post by: MB Themes on December 01, 2022, 10:33:24 PM
all works ok.
Title: Re: Random Offer of the Day Issue
Post by: officela on December 06, 2022, 10:49:37 AM
all works ok.


I never said the opposite... i speak for me.

I'm trying to get some help here, to make it work. And i am asking what the other users did in order to work....
since from the ticket from you i had no solution, since from my hosting company they game the commands and also no solution....

where else i need ask for help if not here?   ( the answer i funny though: "all works ok" !  - apparently not for all )
Title: Re: Random Offer of the Day Issue
Post by: MB Themes on December 06, 2022, 02:52:40 PM
There will be update on this function soon.
Title: Re: Random Offer of the Day Issue
Post by: officela on February 01, 2023, 10:26:55 PM
have you planned any update for this ?

(it's been 2 months and every day i go to make this change by hand to show to visitors my website is alive :)  -  it's psychological tiring procedure :) )

Title: Re: Random Offer of the Day Issue
Post by: MB Themes on February 02, 2023, 10:29:55 AM
https://osclasspoint.com/osclass-themes/general/epsilon-osclass-theme-i194#changelog
Title: Re: Random Offer of the Day Issue
Post by: officela on February 02, 2023, 03:53:42 PM
you so busy to answer normal or what ?

the only thing that has changed to this page is the price, it went up....
other than that nothing relevant to my question on the changelog


(https://i.ibb.co/LPGkSk7/Screenshot-2.jpg) (https://ibb.co/pPm020F)
Title: Re: Random Offer of the Day Issue
Post by: MB Themes on February 02, 2023, 08:42:46 PM
You can follow updates and changelog here.
Title: Re: Random Offer of the Day Issue
Post by: officela on February 02, 2023, 10:38:38 PM
You can follow updates and changelog here.

thanks for explaining what the purpose of the link was!!  8) 8) 8)
apparently i know this :)  and i am monitoring every single day for new version....

And since before 2 months i asked you, and you answered me :

There will be update on this function soon.

I thought to remind you again the issue...
I was thinking to ask you to define what soon is for you but for sure not 2 months.. it's a bigger period....    ::) :P ::) :P
But i will not ask! Since your next answer could be again link don't bother....
As you said:

You can follow updates and changelog here.



Title: Re: Random Offer of the Day Issue
Post by: officela on May 17, 2023, 10:18:36 PM
After months and after waiting the latest update still not works for me.

From hosting they gave me 2 options :

curl https://www.***.gr/index.php >/dev/null 2>&1

wget -O - https://www.****.gr/index.php >/dev/null 2>&1


None is working.
This has result in order my website not look like old, every day i have to go to theme settings to press save in order for the offer of the day to change.

Can someone give a solution??
Title: Re: Random Offer of the Day Issue
Post by: MB Themes on May 18, 2023, 04:45:43 PM
Missing cron params.
Title: Re: Random Offer of the Day Issue
Post by: officela on May 19, 2023, 12:18:19 PM
Missing cron params.

those are set prior to the ccommand.. in cpanel you have to 1st select the parameters...