View Single Post
  #10  
Old 10-25-2003, 09:10 AM
 
shasan shasan is offline
 

Advanced Member
  
Join Date: Oct 2003
Location: Toronto
Posts: 74
 

Default

I tried it on 3.4.2 and the problem was that you filled out the form, and hit login, but it didn't log you in for some reason.

Now I'm not a programmer, but I did really well on pattern detection in an IQ test, so I think I have a fix It seems to work fine, the problem was with the following call to header function:

Code:
header("Location: ../$redirect/cart.php");

In my version, the original login.php used the format:

Code:
func_header_location("../$redirect/cart.php");

There are two instances in the mod snippet that require changing, but that's all and it seems to work like a charm

So in the 3.4.2 version, the mod will be as follows:

Original File: login.php (line 125)
Code:
if ($login_type=="C") { if(!func_is_cart_empty($cart)) func_header_location("../$redirect/cart.php"); else func_header_location("../$redirect/home.php"); }

Modified File: login.php

Code:
if ($login_type=="C") { if(!func_is_cart_empty($cart)) func_header_location("../$redirect/cart.php"); else { $relo_page = strrchr($_SERVER['HTTP_REFERER'], '/'); $relo_page = str_replace('/', '', $relo_page); func_header_location("../$redirect/$relo_page"); }

HTH, lemme know if it works for you.

P.S. This works even if the customer is registering during checkout, and redirects them back to the page they were on, so they don't have to hit 'checkout' again I loved that!
__________________
X-Cart 3.4.2 - Processor: Dual Hamsters, running on tricked out 21\" version of Hamster Wheel. (tireless little buggers)

No hamsters were harmed during the making of this sig. Several were seriously offended.
Reply With Quote