Well i was thinking of using cron, but that would relatively crude
The current switching mechanism is crude too, as it involves writing 1/0 to a text file
Main Topics
Browse All TopicsI'm looking for something i could use in order to turn on/off ecommerce capabilties on a website according to a set of rules. Is there perhaps something i could leverage to do this, perhaps from open source software where time/date based rules are used?
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Crude, but does it work?
If you want something more complex, you can always write a 'cron' script that runs every 10-15 minutes that looks at a rules file to determine what it should do (rather than a cron job at midnight to turn it off and another at 3 am to turn it on, the script could look at various other metrics, etc. to decide if it should turn on or off now or later, etc).
I think, to answer your original question, no. There's no open source solution that meets your specific needs, but from you've described, you should be able to write your own rather easily.
Again, more details are needed.
As memws1 said, you need to provide details.
What is the problem with writing 1/0 to a text file? Would you rather write this to a database? If so, there are perl modules (DBI) to make interfacing with a database very easy. If not a text file nor a database, what would you like to use? Do you want to shut down the webserver? Server a completly different ("come back later") type of site? If using apache, you could have 2 httd.conf (or apache2.conf), and run apach2ctl reload to have it run the appropriate site.
Instead of cron, would you prefer a daemon?
inlineACL plugin for managing access controls
Coolest tool I ever downloaded! Yes, it's free...
http://extensions.joomla.o
Using the plugin, lets say you want to display a link to only those who are not logged in, all those who are logged in will not see it:
Well there's not much more to tell you. The present cart software, afaik, only implements shop on/off with a define in the php configuration file.
This is crude since it's non-transacional and it's quite conceivable that the shop could be turned off in the middle of a purchase, so yes, it would be much better to have this implemented in the database.
As far as the timing is concerned, cron too is crude, but that's what i'm using at the moment. I guess i'm fishing around for bright ideas.
Deane10, i might be missing something, but i don't see the relevance of your comment
I know you've already selected some answers, so maybe you have a working solution. But if not, here is a suggestion.
When someone starts shopping (starts a new "cart"), start a session for them - giving them a session cookie. As long as they have a session cookie, let them finish their transaction. When you want to shut down the site, stop giving out new sessions. This way, if someone is in the middle of a transaction, they get to finish. But new users do not get started.
Business Accounts
Answer for Membership
by: nemws1Posted on 2009-09-09 at 07:04:14ID: 25291388
Just an FYI, your question is rather open-ended, thus it will be difficult for any expert to respond.
Can you describe for us what is involved with turning on/off the ecommerce capabilities on your website? What OS are you running?
At this point, all any of us would be able to say is something along the lines of.. yes, you can do this (you can do most anything - it just takes time and money :-} ). I'm thinking there's an answer using 'cron', but you might be running Windows, where the solution would be similar, but different.
Again, please provide more info - be as specific and provide as many details as possible.