Welcome, Guest ( Customer Panel | Login )




 All Forums
 VPCart Forum
 General help me questions
 session timeouts and redirect
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

dannette
Starting Member

USA
12 Posts

Posted - February 20 2007 :  15:15:35  Show Profile  Reply with Quote
The site I'm developing is to be used for members of different state homeschool associations to buy books. They will get in in one of 2 ways: from their homeschool association site or from a default page with a map that they choose the state (with image map - not my idea!). I will be using the affiliate function for all 50 states, so if the session times out, I want it to go back to that page outside of the shopping directory so they have to choose the state again. The default page is being used for random products so I cannot use that as it makes all different affiliates will have the same main pages (different headers). Does anyone know what I'd have to do to have it redirect to another page outside the directory when it times out? I don't want to set it as the default page for the whole shopping site in admin.

devshb
Senior Member

United Kingdom
1904 Posts

Posted - February 20 2007 :  17:33:10  Show Profile  Visit devshb's Homepage  Reply with Quote
not sure if this'll do it, I haven't tested it, but try editing shopaff.asp and change:


If Affid="" then
Continueshop affhome
end if

(near the top)

to something like this:

If Affid="" then
Continueshop "http://www.yourdomain.com/yourmappage.asp"
end if


or, if you want to have that value easily changeable, add this to shop$config.asp:
Dim xnoaffredirect
xnoaffredirect="http://www.yourdomain.com/yourmappage.asp"


and then changing that bit in shopaff.asp to:

If Affid="" then
Continueshop xnoaffredirect
end if

Simon Barnaby
Developer
[email protected]
www.BigYellowZone.com
Web Design, Online Marketing and VPASP addons

Edited by - devshb on February 20 2007 17:35:56
Go to Top of Page

dannette
Starting Member

USA
12 Posts

Posted - February 21 2007 :  11:06:40  Show Profile  Reply with Quote
Well, that didn't work Simon. I also tried this at the same time as the other:

SetSess "affid",affid
If session("affid")="" then
'Continueshop affhome
Continueshop "http://myurl/"
end if

but it didn't work either. It still wants to go to the "default" site which we aren't even using (headers etc without affiliate). All shopping is to be done with an affiliate. The thing also is, we didn't want them to see the affiliates on the customer's information page at checkout, which I turned off so it has to be sessioned.
Go to Top of Page

devshb
Senior Member

United Kingdom
1904 Posts

Posted - February 21 2007 :  11:48:58  Show Profile  Visit devshb's Homepage  Reply with Quote
ah; see what you mean now; yes, I think you will need the change mentioned above as a kind of extra catch, but you probably also need something added to the bottom of shop$db.asp too, along the lines of....

if (currentpagebeingviewed<>"shopaff.asp") then
if (GetSess("affid")="" or IsNull(GetSess("affid"))=true) then
responseredirect xnoaffredirect
end if
end if

not sure offhand what the server variable is for the raw filename (without the args or protocol or path etc), but you'd replace currentpagebeingviewed with that server variable.

if you've got our domain tools addon then you could use:

if (BYZ_DMT_IS_THIS_FILE_BEING_VIEWED("shopaff.asp")="N") then
if (GetSess("affid")="" or IsNull(GetSess("affid"))=true) then
responseredirect xnoaffredirect
end if
end if

Simon Barnaby
Developer
[email protected]
www.BigYellowZone.com
Web Design, Online Marketing and VPASP addons

Edited by - devshb on February 21 2007 11:55:48
Go to Top of Page

dannette
Starting Member

USA
12 Posts

Posted - February 21 2007 :  13:10:58  Show Profile  Reply with Quote
Well, this didn't work either, Simon. It kept it on the same page and didn't let it go forward into the cart.
Go to Top of Page

dannette
Starting Member

USA
12 Posts

Posted - February 21 2007 :  13:16:54  Show Profile  Reply with Quote
I just tried modifying what you last wrote to session instead of GetSess and it did take it off the page to the cart where it should. I just have to wait for it to time out and see what happens. I adjusted timeout to 10 mins for testing ;).
Go to Top of Page

dannette
Starting Member

USA
12 Posts

Posted - February 21 2007 :  13:20:22  Show Profile  Reply with Quote
Well -that's not going to work either. No matter what page I try to go it redirects to that page.
Go to Top of Page

dannette
Starting Member

USA
12 Posts

Posted - February 21 2007 :  13:52:13  Show Profile  Reply with Quote
I think I got it. I added the last code you had me try to the shoppage_header.htm file of the main site that I don't want anyone to go to.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000
0 Item(s)
$0.00