Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[contribution]Store Open/Closed Support Thread


germ

Recommended Posts

This contribution allows you to set days and times your store is "open" and "closed".

 

If your store is not "open" it prevents customers from checking out.

 

Coded for 2.3.1 but easily adapted to 2.2 versions.

 

Link to contribution forthcoming.

 

If you post in this thread and get no response in a reasonable amount of time (say 24 hours), PM me.

 


Contribution link: Store Open/Closed

Edited by germ

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

  • 2 weeks later...

Can you give more specific instruction how to setup the hours in the code. I cannot change them to suit my needs.

P.S: Sorry I managed to find it :) Can you integrated this in future version in admin for better user control

Edited by mirage101
Link to comment
Share on other sites

Glad you found it.

:)

 

I suppose I could devise some type of Admin interface, but I really see nothing difficult about making edits to a simple text file.

 

I'll put it on my "to do" list.

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

  • 10 months later...

Hi

 

I am having 2 issues which I hope you can help with.

 

When I add the code to the application_top.php - it stops the whole website working, as soon as I remove this code it is ok again.

 

Also my opening times are 16:00 - 02:00 which shows by default store closed as the end is lower than the start. I haven't tried it yet due to the above issue but can I use.

 

sunday / 16:00:00 / 23:59:59

sunday / 00:00:00 / 02:00:00

 

or is there a better work around.

 

Thanks

Link to comment
Share on other sites

So your open time is split, 00:00 - 02:00 and 16:00 - 23:59

:unsure:

 

That's someting I honestly hadn't considered when I developed the contribution.

 

I'll probably have time to work on it this evening and recode it for this eventuality.

 

As far as the site not functioning after you add the code, you must be doing something wrong in the process.

 

Unless you can give me some error message I won't be able to help with that.

 

I know the code works if installed correctly. I have it on my WAMP server and on a UNIX platform on a Web server - no problems.

Edited by germ

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

So your open time is split, 00:00 - 02:00 and 16:00 - 23:59

:unsure:

 

That's someting I honestly hadn't considered when I developed the contribution.

 

I'll probably have time to work on it this evening and recode it for this eventuality.

 

As far as the site not functioning after you add the code, you must be doing something wrong in the process.

 

Unless you can give me some error message I won't be able to help with that.

 

I know the code works if installed correctly. I have it on my WAMP server and on a UNIX platform on a Web server - no problems.

 

Thanks for swift response, I will try reinstalling, unfortunately it doesn't give a specific error, just fails to load the home page.

 

Our opening times are 16:00 - 02:00 Sun - Thurs and 16:00 - 04:00 Fri - Sat, so anything you can do to help would be appreciated.

 

Paul

Link to comment
Share on other sites

Just had a thought, could it be coded to show the closed time in the txt file and then use them to show the opening times, not sure if this will be easier.

 

On the other front it is working again now and it was caused by me trying to change the date to be d/m/Y

 

I changed - function day_dump( $format ) { to function day_dump( 'd/m/Y' ) { which is what I thought the instructions were telling me.

 

Sorry one last thing if we can get the times working ok and I can use the function, then could you help getting DST working for the UK.

Link to comment
Share on other sites

So how do you want DST calculated (when does it start/stop)?

:unsure:

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

British Summer Time runs between the last Sunday in March and the last Sunday in October. In March the UK clocks move Forward by 1 hour and in October they move Backwards or Fall by 1 hour. The UK comprises of (United Kingdom of Great Britain and Northern Ireland). Since 1996 all member states of the European Union change their clocks on the same date at 1am GMT.

2011 - Sunday March 28th 01:00 GMT until Sunday October 31st 01:00 GMT

2012 - Sunday March 25th 01:00 GMT until Sunday October 28th 01:00 GMT

2013 - Sunday March 31st 01:00 GMT until Sunday October 27th 01:00 GMT

2014 - Sunday March 30th 01:00 GMT until Sunday October 26th 01:00 GMT

Link to comment
Share on other sites

New updated contribution uploaded.

 

Added code for "British Summer Time" and "split" open/closed times.

 

Your Sunday in your daily.txt file should look like this:

 

sunday / 00:00:00 / 02:00:00 / 16:00:00 / 23:59:59

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

Excellent thanks for the support, just a small issue as you will see below with the message that comes back when closed.

 

Our store is currently closed.

 

The current store date is 05/18/2012

 

The current store time is 13:09:41

 

Our store hours are:

 

 

Sunday--------- 00:00:00 - 04:00:00

Sunday--------- 16:00:00 - 23:59:59

Monday--------- 00:00:00 - 02:00:00

Monday--------- 16:00:00 - 23:59:59

Tuesday-------- 00:00:00 - 02:00:00

Tuesday-------- 16:00:00 - 23:59:59

Wednesday------ 00:00:00 - 02:00:00

 

 

Days we are closed this year are:

Link to comment
Share on other sites

I knew it looked like that.

 

I suppose you don't like the fact Sunday is on two lines?

:unsure:

Edited by germ

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

My thoughts???

:unsure:

 

I think I didn't pay close enough attention when I was debugging the code!!!

(w00t)

 

I did some code changes and a lot more extensive debugging and uploaded a new package.

 

The code is now "language compliant" (as far as I can tell with the english/spanish languages installed on my test platform) and it won't repeat the days on the "Store Closed" page if you have multiple open/closed times for a single day. And if you don't have any YEARLY_DAYS_FILE references to that are entirely omitted on the "Store Closed" page.

 

As far as your comment:

 

"Happy to have an static file with the opening times on personally but it may not suit others."

 

If that means you'd rather have an "admin interface" rather than data in text files, don't hold your breath.

 

The contribution has, shall we say, "limited application" ( I knew that when I wrote it ) so developing an interface in the admin really didn't seem like an effort that would reap a lot of benefits. I have other endeavors I'd rather devote the time to.

 

If you mean something else you'll have to elaborate.

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

Thanks for the latest changes that looks fine. I wasn't looking for an admin panel, I was thinking along the line of actually editing the code to show a user changeable text output rather than the text output being worked out by the daily.txt.

 

I am confident to edit code that has been written just to tweak it a bit, but don't have the skills to do more than that, but what you have now done works fine for me so again many thanks for the great support.

Link to comment
Share on other sites

i just wanted to say thank you so much for this contribution. very useful as we are a store delivers items and we don't take orders outside of our operation hours. exactly what i was looking for!!

Link to comment
Share on other sites

  • 5 months later...

i would use this one... and yes when store is closed it could be nice to just point to a static HTML page lets call it store_closed.html

 

so when store is closed just call that file and when open open index.php like normal

Link to comment
Share on other sites

  • 5 years later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...