Guest howsthisart Posted March 18, 2006 Share Posted March 18, 2006 ;) I have searched and couldnt' find anything regarding being redirected. I would like the user to be redirected to the homepage after about 10 seconds of logging out. Is this possible? Quote Link to comment Share on other sites More sharing options...
convict Posted March 18, 2006 Share Posted March 18, 2006 Easy and clean solution: skins/{your skin}/styleTemplates/global/index.tpl Search for:<title>{META_TITLE}</title> Add after:<!-- BEGIN: redirect --> <meta http-equiv="refresh" content="5;url=http://www.cubecart.com/"> <!-- END: redirect --> Red marked - Redirect Delay in seconds (0 = redirect immediately) Blue marked - Redirection URL (your home page here etc.) Final code around new one looks like this:<!-- BEGIN: body --> <!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset={VAL_ISO}" /> <title>{META_TITLE}</title> <!-- BEGIN: redirect --> <meta http-equiv="refresh" content="5;url=http://www.cubecart.com/"> <!-- END: redirect --> <meta name="description" content="{META_DESC}" /> <meta name="keywords" content="{META_KEYWORDS}" /> includes/content/logout.inc.php Add code below: Final code around new one looks like:if($update == TRUE && !isset($_GET['s'])) { header("Location: index.php?act=logout&s=1"); exit; } elseif(isset($_GET['s']) && $_GET['s']==1) { $logout->assign("LANG_LOGOUT_STATUS",$lang['front']['logout']['session_destroyed']); $body->parse("body.redirect"); } else { $logout->assign("LANG_LOGOUT_STATUS",$lang['front']['logout']['no_session']); $body->parse("body.redirect"); } ;)$body->parse("body.redirect"); After this: $logout->assign("LANG_LOGOUT_STATUS",$lang['front']['logout']['session_destroyed']); and this code: $logout->assign("LANG_LOGOUT_STATUS",$lang['front']['logout']['no_session']); Quote Link to comment Share on other sites More sharing options...
Guest howsthisart Posted March 18, 2006 Share Posted March 18, 2006 Thanks convict that worked great. ;) Quote Link to comment Share on other sites More sharing options...
convict Posted March 18, 2006 Share Posted March 18, 2006 You are welcome ;) Quote Link to comment Share on other sites More sharing options...
Guest hobsdv Posted March 18, 2006 Share Posted March 18, 2006 great little mod should be on cubecart.org if it is`nt already Quote Link to comment Share on other sites More sharing options...
Guest EverythingWeb Posted March 18, 2006 Share Posted March 18, 2006 This has been added to the Pinned topic in the Skins & Templates Category. http://www.cubecart.com/site/forums/index....showtopic=12497 Thanks Convict. Quote Link to comment Share on other sites More sharing options...
Guest apple Posted March 29, 2006 Share Posted March 29, 2006 includes/content/logout.inc.php I cant find file mentoned above. Where is it located? I can only see logout.tpl in styleTemplates/content/logout.tpl Quote Link to comment Share on other sites More sharing options...
convict Posted March 29, 2006 Share Posted March 29, 2006 Dont you have folder includes and then content? includes/content in your CubeCart folder there is a file logout.inc.php Quote Link to comment Share on other sites More sharing options...
Guest apple Posted March 30, 2006 Share Posted March 30, 2006 Dont you have folder includes and then content? includes/content in your CubeCart folder there is a file logout.inc.php Oh yes, I see it now. I was looking at the wrong folder. OK. I have updated my files but it istill not re-directing it. Any idea? :D Quote Link to comment Share on other sites More sharing options...
Guest DocRocks Posted March 31, 2006 Share Posted March 31, 2006 Great explanation - thanks convict. Quote Link to comment Share on other sites More sharing options...
Guest apple Posted March 31, 2006 Share Posted March 31, 2006 Great explanation - thanks convict. Doesnt work with FF on a Mac. Any idea?? Anyone?? Quote Link to comment Share on other sites More sharing options...
Guest Guys and Gals Perfume Posted June 19, 2006 Share Posted June 19, 2006 G'day Convict, I added in your coding to redirect the user to the homepage once they have purchased an item. At the time, I typed in all the coding and I am not sure that if, in there somewhere I had a minor typo? I purchased an item on the site to test that everything was working correctly and it all worked fine until time came to the redirction. After the redirection, instead of returning to the homepage, it came up with a white screen saying: Error: No payment gateway variable is set! I took a screen print of that page to save as a reference. I have now gone back into your thread, and have literally copied the code and pasted it into the document to alleviate any typo's since everyone else seems to have had success with the code. Is there any way of testing that this coding is correct in the web site without having to literally purchase an item? Also, where you refer to alter this inital file type: skins/{your skin}/styleTemplates/global/index.php ...if I go to this directory, my file type is index.tpl and therefore that is the file I have altered the text in. Is this correct or is this where I could be having problems? Thanks for any help! Cheers, Shanna. Quote Link to comment Share on other sites More sharing options...
Guest Guys and Gals Perfume Posted June 19, 2006 Share Posted June 19, 2006 Convict, I may be a twit here...I re read the thread of Q & A's and it looks like I have gotten the wrong idea from the initial question... Return to Log Out Page...I was talking about once a person purchased an item to redirect to home page. I went back into the site and check the logout bizzo, and that worked fine. Having said said that, not sure if this is correct thread to ask this question, but any ideas as to what is happening once a person has purchased the item as to why it is coming up with the payment gateway error message? Thanks, Shanna. Quote Link to comment Share on other sites More sharing options...
convict Posted June 19, 2006 Share Posted June 19, 2006 Also, where you refer to alter this inital file type: skins/{your skin}/styleTemplates/global/index.phpYes, this is a typo. I have changed the php to tpl which is right in my primary topic post. I added in your coding to redirect the user to the homepage once they have purchased an item.Dont forget you have to inform customer payment was sucessful or not. If you want to redirect customer to homepage in case payment was sucessful, you have to do it in includes/content/confirmed.inc.php Be ware there is a affiliate module code, if you dont use affiliate module you may redirect the customer sucesfully paid with following code: Open file i have mentioned above Search for $basket = $cart->unsetVar("shipMethod"); ADD AFTER header("Location: index.php"); exit(); Quote Link to comment Share on other sites More sharing options...
Guest Guys and Gals Perfume Posted June 19, 2006 Share Posted June 19, 2006 Thanks for your help convict...don't know what I'd do without the help of you guys. See how we go! Quote Link to comment Share on other sites More sharing options...
Guest NorthernWC Posted December 1, 2006 Share Posted December 1, 2006 Great explanation - as always! Thanks Convict! HFr ;) Quote Link to comment Share on other sites More sharing options...
Guest eric47905 Posted December 19, 2006 Share Posted December 19, 2006 Thanks Convict, I was fighting a bug where when someone would log in it would place a 1 in the search box, then when you logged out it would run thaqt search when you clicked on anything... I have no idea what was causing it, but it is fixed now, you rock! Quote Link to comment Share on other sites More sharing options...
Guest nursepower Posted February 5, 2008 Share Posted February 5, 2008 Thanks! I used this and it works! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.