Hi Anurag
i'd like to do this too - redirect to a page outside of zencart (a joomla homepage in my root directory) - did you manage to find a solution?
I realise it is sometime since you posted this but i hope you may have got somewhere in the meantime
many thanks
ben
Dear Ben,
That was a long time ago and I did figure it out, but I am not sure whether the solution would work for you as well. In my case I really needed to log which registered users clicks on a link to another web site which was unrelated to that company. I did not need to take care whether the user remained logged in or not. Another consideration was that all my changes have been made to an older release of ZenCart (1.2.5), for the current version a different approach may be appropriate.
If you want to combine Joomla and ZenCart you could look into a bridge as someone already has mentioned. I think there are two different kind of bridges as of now, but I do not have any experience with either of them (it is on my list of what-to-do-in-my-spare-time, although admittedly not very high :)
Anyways, the way I achieved it was by adding an additional page to ZenCart which had the code that was logging the user information in the database before redirecting. Then I modified the file called html_header.php which is in
Code:
templates/YOURTEMPLATE/common/html_header.php
The modified code looked like this:
Code:
// added to set the meta tag refresh to redirect to retrieve.com
// Is current page "redirect" ?
$body_id =$_GET['main_page'];
if ($body_id == 'redirect' ) {
define('REDIRECT_SWITCH', '2;URL=http://MYURL/');
}
else {
define('REDIRECT_SWITCH', '');
}
Bookmarks