Results 1 to 10 of 15

Hybrid View

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

    Default Re: Auto Store Open/Close (ASOC) - [Support Thread]

    Thanks for your detailed info Mihaela.

    Firstly change the name of your admin folder as soon as possible and in future postings do not disclose the real name of your admin!!!

    Quote Originally Posted by mihaela View Post
    Hallo Frank!
    Thank you for your 2 statements.
    This is my test plattform:
    V-Server from Strato.AG (in Berlin) / My Zen-Shop in Stuttgart / There is no time difference in between. Die Zeitzone zum Ausführen der Aufgabe ist (UTC +01:00) Europe / Berlin
    Server Betriebssystem: Linux 3.13.0-042stab111.12 Datenbank: MySQL 5.5.47-0ubuntu0.14.04.1
    Server Datum: 15.02.2016 13:09:07 Datenbank Datum: 15.02.2016 13:09:07
    Server Up Time: 13:09:07 up 2:27, 0 users, load average: 0.14, 0.06, 0.03 HTTP Server: Apache
    PHP Version: 5.5.9-1ubuntu4.14 (Zend: 2.5.0) PHP Memory Limit: 256M PHP Safe Mode: Off
    PHP Datei Uploads: On Max. Größe: 16M POST Max. Größe: 16M
    That looks fine to me.

    Quote Originally Posted by mihaela View Post
    My shop is to see under: lieferservice.restaurant-weilerhau.de
    Now I did (once more than 100 times) the same as in installation documentation and after your statement:
    1.Install „auto_store_open_close.php“ (today: auto_store_open_close.php, v 1.2 2016/02/15 / code edited direct in cPanel , no copy per FTP)
    2.Than, I’ve uploaded the „init_cron_admin_user_id.php“ file in /includes/init_includes/overrides/
    3.Cron jobs:
    If I write the cron job with „wget“ like:

    30 11 * * * wget http://My_Domain/zencart/zen_admin/a...open_close.php
    00 22 * * * wget http://My_Domain/zencart/my_zen_admi...open_close.php

    I do not get any answer……
    Looks like wget may not be installed/enabled on your server or it would send you an email when the cron job is executed. You could check with your server people in Berlin if this is the case, and if not then you may ask them to enable wget. This is the first thing to do.

    Quote Originally Posted by mihaela View Post
    By the way:
    1. wget is one of the files that needs to have rights 700, else every hackers uploaded script can use it to download the rest of the hack from external websites.
    All files (with the exception of the 2 configure.php files) should be set to 644, wget works with these permissions

    Quote Originally Posted by mihaela View Post
    Do you think that this could be a reson, why the “„init_cron_admin_user_id.php“ in our case is not doing well?

    It may be possible that the YOUR_ADMIN/includes/init_includes/overrides/init_cron_admin_user_id.php does not respond to your lynx command. I had something similar happening on a client's server....

    Try this:

    1. copy the file YOUR_ADMIN/includes/init_includes/init_admin_auth.php into the folder YOUR_ADMIN/includes/init_includes/overrides/
    2. in the copied file (not the original) init_admin_auth.php add this code


    PHP Code:
    if (!isset($_SESSION['admin_id']) && defined('CRON_ADMIN_USER_ID') && (int)CRON_ADMIN_USER_ID != 0) { 
      
    $_SESSION['admin_id'] = CRON_ADMIN_USER_ID

    right after the line

    PHP Code:
    if (!defined('IS_ADMIN_FLAG')) die('Illegal Access'); 
    3. delete the file YOUR_ADMIN/includes/init_includes/overrides/init_cron_admin_user_id.php

    4. in the file YOUR_ADMIN/auto_store_open_close.php (which I posted above) set

    PHP Code:
    $store_open = ("10:55:00");// 10:55 am
    $store_close = ("21:55:00"); // 09:55 pm 
    which is 5 minutes before your cron job times.

    Let us know what transpires.

    Cheers / Frank

    PS: Ich bin in Schwenningen am Neckar (jetzt Villingen-Schwenningen) geboren und aufgewachsen, lebe seit fast 40 Jahren in Australien...

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

    Default Re: Auto Store Open/Close (ASOC) - [Support Thread]

    Another option is to use cURL (curl in the command line):

    Code:
    30 11 * * * curl -s 'http://yourdomain.com/zencart-installation/youradmin/auto_store_open_close.php'
    00 22 * * * curl -s 'http://yourdomain.com/zencart-installation/youradmin/auto_store_open_close.php'
    Make sure you leave the -s switch intact (runs the command in silent mode) and also do not remove the single quotes before and after the URL.

  3. #3
    Join Date
    Jun 2015
    Location
    Germany
    Posts
    3
    Plugin Contributions
    0

    Default Re: Auto Store Open/Close (ASOC) - [Support Thread]

    Oh, happy day!
    You Frank taught me how,
    how to watch, How to fight………………….
    And living rejoicing everyday…….

    I followed yor last recomanded solution:

    1. copy the file YOUR_ADMIN/includes/init_includes/init_admin_auth.php into the folder YOUR_ADMIN/includes/init_includes/overrides/
    2. in the copied file (not the original) init_admin_auth.php add this code

    PHP Code:

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

    right after the line
    PHP Code:

    if (!defined('IS_ADMIN_FLAG')) die('Illegal Access');

    3. delete the file YOUR_ADMIN/includes/init_includes/overrides/init_cron_admin_user_id.php

    4. in the file YOUR_ADMIN/auto_store_open_close.php (which I posted above) set

    PHP Code:

    $store_open = ("10:55:00");// 10:55 am
    $store_close = ("21:55:00"); // 09:55 pm

    which is 5 minutes before your cron job times.


    Everything works as wanted!
    Thank you Frank. You have considerable enriched the value of Zen with your plugin.
    Sie haben den Wert des ZenCart mit Ihrem Plugin erheblich
    angereichert.

    I want to share my joy with all who support this wonderfull ZenCart. I'll donate a Cup of coffee.Mihaela

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

    Default Re: Auto Store Open/Close (ASOC) - [Support Thread]

    Quote Originally Posted by mihaela View Post
    Oh, happy day!
    You Frank taught me how,
    how to watch, How to fight………………….
    And living rejoicing everyday…….

    ......

    Everything works as wanted!
    Thank you Frank. You have considerable enriched the value of Zen with your plugin.
    Sie haben den Wert des ZenCart mit Ihrem Plugin erheblich
    angereichert.

    I want to share my joy with all who support this wonderfull ZenCart. I'll donate a Cup of coffee.Mihaela
    Thanks Mihaela, I am glad all is working for you now.

    Donation? Eine Portion Spaetzle bitte.....

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

    Default Re: Auto Store Open/Close (ASOC) - [Support Thread]

    ASOC v1.2 is now available from the downloads at https://www.zen-cart.com/downloads.php?do=file&id=1891

    This update is compatible with ZC 1.5.4 and ZC 1.5.5

    Changes:

    - Updated file YOUR_ADMIN/auto_store_open_close.php
    - Added file init_admin_auth.php to folder YOUR_ADMIN/includes/init_includes/overrides/ with modifications
    - Added extra styling to stylesheet.css

  6. #6
    Join Date
    Nov 2013
    Location
    Dorset, UK
    Posts
    124
    Plugin Contributions
    0

    Default Re: Auto Store Open/Close (ASOC) - [Support Thread]

    Quote Originally Posted by frank18 View Post
    ASOC v1.2 is now available from the downloads at https://www.zen-cart.com/downloads.php?do=file&id=1891

    This update is compatible with ZC 1.5.4 and ZC 1.5.5

    Hi,

    Nice work, I have attempted a similar process and failed recently.

    Am I to assume the time difference between auto_store_open_close.php & cron is the difference between last orders and the physical store closing??

    I have read instructions several times just want to check before I implement.

    Thanks in advance

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

    Default Re: Auto Store Open/Close (ASOC) - [Support Thread]

    Quote Originally Posted by SpaceMonkey View Post
    Hi,

    Nice work, I have attempted a similar process and failed recently.

    Am I to assume the time difference between auto_store_open_close.php & cron is the difference between last orders and the physical store closing??

    I have read instructions several times just want to check before I implement.

    Thanks in advance

    You will need to decide on a time when you want your online store to "go off-air" so to speak.

    Say you are accepting last orders at 22.30 and your physical store shuts at 23.00 then cron has to close your online store at 22.30 or even 22.29

    Just take care of the time difference of your server, if it is the USA and your store is in the UK then apply the TD between UK and the time of your server location.

    If your server is in the UK as well then all is good, same time.

  8. #8
    Join Date
    Nov 2013
    Location
    Dorset, UK
    Posts
    124
    Plugin Contributions
    0

    Default Re: Auto Store Open/Close (ASOC) - [Support Thread]

    Quote Originally Posted by frank18 View Post
    You will need to decide on a time when you want your online store to "go off-air" so to speak.

    Say you are accepting last orders at 22.30 and your physical store shuts at 23.00 then cron has to close your online store at 22.30 or even 22.29

    Just take care of the time difference of your server, if it is the USA and your store is in the UK then apply the TD between UK and the time of your server location.

    If your server is in the UK as well then all is good, same time.
    That's cool.

    No hosting is USA (New York) and DST is also 1 week later than the UK, just to be awkward.

    Anyhow, I am about to merge the module and template files into my live store so all good in testing.

    Thanks for confirmation.


 

 

Similar Threads

  1. Hebrew Support - latest release [Support Thread]
    By eranariel in forum Addon Language Packs
    Replies: 22
    Last Post: 26 Jan 2026, 06:47 AM
  2. Replies: 1
    Last Post: 16 Feb 2011, 07:46 AM
  3. Temporarily close store
    By scottb in forum General Questions
    Replies: 10
    Last Post: 14 Jul 2007, 05:20 AM
  4. Failed to open thread?
    By tison in forum General Questions
    Replies: 2
    Last Post: 6 Dec 2006, 03:57 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