Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Need help with code - login redirect or pop-up on page load

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 06-20-2011, 08:34 AM
  mizNRG's Avatar 
mizNRG mizNRG is offline
 

Senior Member
  
Join Date: Jun 2010
Posts: 157
 

Default Need help with code - login redirect or pop-up on page load

Here's some background: On our home page we have company logos for the OEMs that we do business with. Each has a category specific to their product line and some of these require a login to view (membership specific). Right now I have the logos set up to bring you to the login page when you click on them (those not requiring a login go directly to their category). However, after logging in, the customer is brought back to the home page and not to the category specific to their OEM.

Possible solutions:
1. Upon clicking on logo customer will be brought to their category and the login pop-up will appear upon page load. I'm not sure where to insert the code necessary for the pop-up to appear. I tried using the code below but it didn't work. Any suggestions?
Code:
<td><a href="http://klineind.com/home.php?cat=250" onload="javascript: return !popupOpen('login.php');" href="http://klineind.com/login.php"><img src="/skin/common_files/images/Toro_Logo.jpg" alt="ToroLogo" /></a></td>

2. Find a way to redirect the customer to the appropriate category. I'm assuming this would be an if/then statement, but I haven't looked into this just yet.

Any advise/help would be greatly appreciated.
__________________
X-Cart 4.4.4 Gold
Reply With Quote
  #2  
Old 06-20-2011, 10:09 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,191
 

Default Re: Need help with code - login redirect or pop-up on page load

Redirection to home page is done in include/login.php in few placed depending on how/from where you are loggin in

Look for
func_header_location('home.php');
or
func_header_location($redirect_url);
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 10:20 PM.

   

 
X-Cart forums © 2001-2020