Results 1 to 10 of 21

Hybrid View

  1. #1
    Join Date
    Oct 2007
    Posts
    132
    Plugin Contributions
    0

    Default add to cart only during physical store operating hours?

    Is there a way to allow the add-to-cart only during store hours?

    This is for online ordering for a restaurant. Do not want people sending order if the store is closed.

    Thanks,
    Jeff

  2. #2
    Join Date
    Oct 2006
    Posts
    5,477
    Plugin Contributions
    11

    Default Re: add to cart only during physical store operating hours?

    You can certainly write/or hire someone to write a simple cronjob to do that. The job just have to change the store mode to view price only when it closes, and change back to normal when it opens. Or you can do it manually.
    I no longer provide installation support on forum for all my modules. However, if there are real bugs with the modules please feel free to contact me

  3. #3
    Join Date
    Oct 2007
    Posts
    132
    Plugin Contributions
    0

    Default Re: add to cart only during physical store operating hours?

    Thanks for the reply.

    After reading about cron jobs, it seems they run at a set time.

    Would it work if a code was added to index.php (I think that's where it is needed) that would do the date/time checks and set "STORE_STATUS" for the current session?

    I think the answer to my question depends on whether STORE_STATUS is set once or if it is read from the database multiple times? If read once, my logic says this will work. If read multiple times, the program would need to update the table. This leads to the question of if I am correct that index.php would always be executed upon entering the site preventing someone from getting an incorrect status?

    Sorry I took so long to respond. I missed your reply somehow.

    Jeff

  4. #4
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: add to cart only during physical store operating hours?

    What if someone is online for an hour before your restaurant closes, and orders after that?
    The check really needs to happen when an order is placed, and possibly also when the add to cart is clicked.

  5. #5
    Join Date
    Oct 2006
    Posts
    5,477
    Plugin Contributions
    11

    Default Re: add to cart only during physical store operating hours?

    I dont understand why you dont like the idea of having cronjob running at certain time. It seems to help you with your requirement. Or is there any I'm missing?
    I no longer provide installation support on forum for all my modules. However, if there are real bugs with the modules please feel free to contact me

  6. #6
    Join Date
    Oct 2007
    Posts
    132
    Plugin Contributions
    0

    Default Re: add to cart only during physical store operating hours?

    yellow1912,

    The site will potentially host hundreds of restaurants, each a separate ZC install on a single server. My thought process was that it might be easier to just have a single mod on each site that checked a store hours table (one table created for each store).

    After giving more thought to your suggestion, I do like your idea. I'm sure the routine could run every half hour and check if any stores need to be updated. That makes sense.

    gjh42,

    Good question! I'm going to have to test this. I'll see what happens if I change the store status after beginning order entry.

    Thanks to all. I really appreciate the help.

 

 

Similar Threads

  1. Any Zen Cart users operating out of New Jersey?
    By tomzc in forum General Questions
    Replies: 0
    Last Post: 20 Jun 2008, 08:00 PM
  2. Store Hours
    By brycej2 in forum Basic Configuration
    Replies: 5
    Last Post: 8 Mar 2007, 10:05 PM
  3. Changing Store's Physical Address
    By AngelStorm in forum Basic Configuration
    Replies: 2
    Last Post: 20 Oct 2006, 02:36 AM

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