Thread: Cron Job

Results 1 to 10 of 20

Hybrid View

  1. #1
    Join Date
    Jun 2008
    Location
    Washington, DC
    Posts
    789
    Plugin Contributions
    7

    Default Re: Cron Job

    Quote Originally Posted by Cenkki View Post
    Thanks for your answer.
    I try and it came error message.
    ERROR: admin/includes/configure.php file not found. Suggest running zc_install/index.php?
    require('includes/application_top.php'); this file loads the paths needed for configure.php

    For testing uncomment the echo commands.

    Then call the script www.xxxxxx/adminxxx/store_status.php

    After you get the script to work then setup the cron up.

    Skip
    • 446F63746F722057686F •

  2. #2
    Join Date
    Sep 2010
    Location
    Finland
    Posts
    59
    Plugin Contributions
    0

    Default Re: Cron Job

    fortunately it works.
    wget -O - www.xxxxxx/xxxxx/adminxxx/store_status.php
    add... define('CRON_ADMIN_USER_ID', '1');

    but :)

    if store status 2= Showcase with prices, it change 1= Showcase no prices
    if store status 0= Normal Store, its change 1= Showcase no prices again
    if store status 1= Showcase no prices, its not changing

  3. #3
    Join Date
    Nov 2007
    Location
    Sunny Coast, Australia
    Posts
    3,378
    Plugin Contributions
    9

    Default Re: Cron Job

    Quote Originally Posted by Cenkki View Post
    fortunately it works.
    wget -O - www.xxxxxx/xxxxx/adminxxx/store_status.php
    add... define('CRON_ADMIN_USER_ID', '1');

    but :)

    if store status 2= Showcase with prices, it change 1= Showcase no prices
    if store status 0= Normal Store, its change 1= Showcase no prices again
    if store status 1= Showcase no prices, its not changing
    That indicates that the script is working as per configuration:

    PHP Code:
    if ((date(H) >= $store_open) && (date(H) <= $store_close)) {
    $zen_store_stat 0// Store is Open Normal Zen Cart
    } else {
    $zen_store_stat 1// Store is Closed Showcase no Prices

    If you wanted store status = 2 then you would need to set

    PHP Code:
    $zen_store_stat 2// Store is Closed Showcase with prices 

  4. #4
    Join Date
    Sep 2010
    Location
    Finland
    Posts
    59
    Plugin Contributions
    0

    Default Re: Cron Job

    It doesn't change store status open (0), with all combination.

  5. #5
    Join Date
    Sep 2010
    Location
    Finland
    Posts
    59
    Plugin Contributions
    0

    Default Re: Cron Job

    I forget add that code also...

    admin/init_includes/init_admin_auth.php

    if (!isset($_SESSION['admin_id']) && defined('CRON_ADMIN_USER_ID') && (int)CRON_ADMIN_USER_ID != 0) {
    $_SESSION['admin_id'] = CRON_ADMIN_USER_ID;
    }

  6. #6
    Join Date
    Nov 2007
    Location
    Sunny Coast, Australia
    Posts
    3,378
    Plugin Contributions
    9

    Default Re: Cron Job

    Quote Originally Posted by Cenkki View Post
    It doesn't change store status open (0), with all combination.
    Played with this on a local install. I changed

    PHP Code:
    if ((date(H) >= $store_open) && (date(H) <= $store_close)) { 
    to

    PHP Code:
    if ((date('H:i:s') >= $store_open) && (date('H:i:s') <= $store_close)) { 
    and it appears to work

  7. #7
    Join Date
    Sep 2010
    Location
    Finland
    Posts
    59
    Plugin Contributions
    0

    Default Re: Cron Job

    You know this work.
    Thanks

  8. #8
    Join Date
    Nov 2007
    Location
    Sunny Coast, Australia
    Posts
    3,378
    Plugin Contributions
    9

    Default Re: Cron Job

    Quote Originally Posted by Cenkki View Post
    You know this work.
    Thanks
    Good to see that you got this working for you now.

    Cheers / Frank

 

 

Similar Threads

  1. v154 Cron job coding
    By droidmcse in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 24 Apr 2015, 11:29 PM
  2. Cron Job to enable a EZ Page?
    By cs_jono in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 4 Jun 2010, 08:20 PM
  3. CRON job help
    By Jeff G in forum General Questions
    Replies: 10
    Last Post: 9 Oct 2008, 12:20 AM
  4. zen_mail as part of a cron job...
    By savage in forum General Questions
    Replies: 0
    Last Post: 30 Nov 2007, 06:25 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg