• Toll-free  888-665-8637
  • International  +1 717-220-0012
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Aaron
#1 Posted : Friday, October 28, 2011 10:26:27 AM(UTC)
Aaron

Rank: Administration

Joined: 4/2/2004(UTC)
Posts: 2,395
United States
Location: Hummelstown, PA

Thanks: 6 times
Was thanked: 163 time(s) in 158 post(s)
Recently it occurred to me that the "Closed" page has a critical flaw: if a user refreshes the page to see if the store is open, it will always show the closed page. The only way a user will realize that the store has opened again is by stripping the "Closed.aspx" from the URL or following some other link or bookmark to the site. Not good!

Here's a little snippet of code that you can add to the beginning of your Page_Load method:

Code:
' <DEVELISYS>
If Not WebAppSettings.StoreClosed Then
Response.Redirect(WebAppSettings.SiteStandardRoot)
End If
' </DEVELISYS>
Aaron Sherrick
BV Commerce
Toll-free 888-665-8637 - Int'l +1 717-220-0012
Kman
#2 Posted : Friday, October 28, 2011 10:34:22 AM(UTC)
Kman

Rank: Member

Joined: 11/25/2003(UTC)
Posts: 370

Nice find Aaron, thanks.
Regards,
Kim(Kman) Rossey
www.toocoolwebs.com
BVSoftware - MerchantTribe Programming/Design, Database Programming and Business Applications
[email protected]
Marcus
#3 Posted : Friday, October 28, 2011 12:57:02 PM(UTC)
Marcus

Rank: Member

Joined: 11/5/2003(UTC)
Posts: 1,786

Thanks for the suggestion!
Aaron
#4 Posted : Friday, October 28, 2011 5:23:28 PM(UTC)
Aaron

Rank: Administration

Joined: 4/2/2004(UTC)
Posts: 2,395
United States
Location: Hummelstown, PA

Thanks: 6 times
Was thanked: 163 time(s) in 158 post(s)
And if you really want to make it sexy, add the following JavaScript code to the Closed.aspx page or via the Closed page content in the admin. This will cause the page to automatically reload every 15 seconds. Once you open the store again the VB code from my first post will redirect the user to the homepage.

Code:

<!-- <DEVELISYS> -->
<script type="text/javascript">
var refreshTimeInSeconds = 15;
setTimeout("location.reload(true)", refreshTimeInSeconds * 1000);
</script>
<!-- </DEVELISYS> -->
Aaron Sherrick
BV Commerce
Toll-free 888-665-8637 - Int'l +1 717-220-0012
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

©2025 Develisys. All rights reserved.
  • Toll-free  888-665-8637
  • International  +1 717-220-0012