*

Tango

  • ****
  • 212 posts
Random Offer of the Day Issue
« 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!
« Last Edit: August 27, 2022, 02:57:19 PM by Tango »

*

MB Themes

Re: Random Offer of the Day Issue
« Reply #1 on: August 27, 2022, 04:40:41 PM »
Do you have latest version?
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

mwindey

  • *****
  • 420 posts
Re: Random Offer of the Day Issue
« Reply #2 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
« Last Edit: August 27, 2022, 04:55:27 PM by mwindey »

*

Tango

  • ****
  • 212 posts
Re: Random Offer of the Day Issue
« Reply #3 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!

*

Tango

  • ****
  • 212 posts
Re: Random Offer of the Day Issue
« Reply #4 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.

*

mwindey

  • *****
  • 420 posts
Re: Random Offer of the Day Issue
« Reply #5 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
« Last Edit: August 27, 2022, 11:44:03 PM by mwindey »

*

Tango

  • ****
  • 212 posts
Re: Random Offer of the Day Issue
« Reply #6 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)

*

MB Themes

Re: Random Offer of the Day Issue
« Reply #7 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
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

officela

  • ***
  • 52 posts
Re: Random Offer of the Day Issue
« Reply #8 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
« Last Edit: November 09, 2022, 09:21:25 PM by officela »

*

MB Themes

Re: Random Offer of the Day Issue
« Reply #9 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.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

officela

  • ***
  • 52 posts
Re: Random Offer of the Day Issue
« Reply #10 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 )


*

MB Themes

Re: Random Offer of the Day Issue
« Reply #11 on: November 19, 2022, 10:15:44 AM »
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

officela

  • ***
  • 52 posts
Re: Random Offer of the Day Issue
« Reply #12 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 :)
« Last Edit: November 19, 2022, 06:45:32 PM by officela »

*

officela

  • ***
  • 52 posts
Re: Random Offer of the Day Issue
« Reply #13 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 ????