X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Need help with code - login redirect or pop-up on page load (https://forum.x-cart.com/showthread.php?t=59860)

mizNRG 06-20-2011 08:34 AM

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.

cflsystems 06-20-2011 10:09 AM

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);


All times are GMT -8. The time now is 10:24 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.