Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

BIG PROBLEM! No cart contents, Account enter loops to Index page


ecgbyme

Recommended Posts

Posted

I pretty well have our site back to normal, many errors resloved since the implemation of PHP 5.3 but now items purchased do not appear in the cart.

As well when you try to enter into your account, it loops over to the main page, the index page.

Don't have any idea where to look or what to do. Site useless until these problems can be resolved.

Greatly appreciate any help!!

Posted

I have checked and rechecked includes/configure.php and contacted our server to confirm that the SSL info was correct.

 

Would anyone know atleast what .php files are associated with the cart's funtion and customer login?

Posted

Hi

 

'add to cart' is caught in includes/application_top.php - but may also be that you are losing the session value somewhere so that each time you add to cart you start a new sesssion

 

The login loop sounds like the customer session is maybe not registering?

 

Graeme

Posted

in /includes/application_top I put in this code on line 221:

 

if ( ($session_started == true) && (PHP_VERSION >= 4.3) && function_exists('ini_get') && (ini_get('register_globals') == false) ) {

extract($_SESSION, EXTR_OVERWRITE+EXTR_REFS);

}

 

Customer login stopped looping to the index page but states an error that there is no match for Customer or Password.

I believe that's much closer them looping to the index page.

 

Can anyone please reslove why the customer is not being identified?

Posted

The problem might be with scipe like

 

// remove from database

if (tep_session_is_registered('customer_id')) {

 

tep_session_is_registered may have to changed to PHP 5.3 compatabilty.

 

Could some post their cart working: /includes/classes/shopping_cart.php

Please help! Need to resolve this

Posted

I CAN'T BELIEVE I GOT IT! I GOT THE SHOPPING CART WORKING!

 

After all day I came upon the right code which I found on Google:

 

In catalog and admin side I changed in /includes/functions/sessions.php around line 70:

 

This:

 

function tep_session_register($variable) {

return isset($_SESSION[$variable]);

 

if ($session_started == true) {

return session_register($variable);

} else {

return false;

}

}

 

function tep_session_is_registered($variable) {

return isset($_SESSION) && array_key_exists($variable, $_SESSION);

}

 

 

function tep_session_unregister($variable) {

return ($_SESSION[$variable]);

}

 

TO THIS:

 

 

// check PHP version and use appropriate session variables - authored by ecartz (Matt)

function tep_session_register($variable) {

global $session_started;

 

if ($session_started == true) {

if (PHP_VERSION < 4.3) {

return session_register($variable);

} else {

if (isset($GLOBALS[$variable])) {

$_SESSION[$variable] =& $GLOBALS[$variable];

} else {

$_SESSION[$variable] = null;

}

}

}

 

return false;

}

 

function tep_session_is_registered($variable) {

if (PHP_VERSION < 4.3) {

return session_is_registered($variable);

} else {

return isset($_SESSION) && array_key_exists($variable, $_SESSION);

}

}

 

function tep_session_unregister($variable) {

if (PHP_VERSION < 4.3) {

return session_unregister($variable);

} else {

unset($_SESSION[$variable]);

}

}

 

And now the cart is filling with products!!

 

Still stuck on Customer Login - Does not recognize the client or password. ANY HELP WOULD BE GREATLY APPRECIATED!

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...