Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Shopping cart empty after login and clicking on Shopping cart


hydro

Recommended Posts

I add products to shopping cart, click on checkout and login. I click on the cart content to change the cart content. However the cart is returned empty.

 

Seems the osCID is changing between the SSL and NON-SSL. Where and in which files can I make sure that the content of the shopping cart is copied between the SSL and NON-SSL when logged in. Do I need to add the 'SSL' in the tep_href_link for the shopping cart button?

 

 

In the header.php for the shopping cart button,

echo tep_draw_button(HEADER_TITLE_CART_CONTENTS . ($cart->count_contents() > 0 ? ' (' . $cart->count_contents() . ')' : ''), 'cart', tep_href_link(FILENAME_SHOPPING_CART,)) .

 

I header.php for the shopping cart button, I change it to the following and it only worked to a certain point:

 

echo tep_draw_button(HEADER_TITLE_CART_CONTENTS . ($cart->count_contents() > 0 ? ' (' . $cart->count_contents() . ')' : ''), 'cart', tep_href_link(FILENAME_SHOPPING_CART, '', 'SSL')) .

 

 

 

My setting in configure.php:

 

 

define('HTTP_SERVER', 'http://www.domain.com');

define('HTTPS_SERVER', 'https://secure.domain.com');

define('ENABLE_SSL', true);

define('HTTP_COOKIE_DOMAIN', 'www.domain.com');

define('HTTPS_COOKIE_DOMAIN', 'secure.domain.com');

 

define('USE_PCONNECT', 'true');

define('STORE_SESSIONS', '');

 

In Session configuration in admin:

 

Force Cookie Use: False

Check SSL Session ID: True

Check User Agent: False

Check IP Address: False

Prevent Spider Sessions: True

Recreate Session: True

Link to comment
Share on other sites

@@hydro

 

I suggest reading THIS very good thread created by GERM which focuses on SSL issues. I am going to guess, it is because your sharing your SSL which this thread also covers.

 

 

Chris

Link to comment
Share on other sites

On my new server environment I had to force cookie usage and recreate false.

This worked for me, but won't necessarily help you. I haven't truely figured out why my session recreate wont work ...

KEEP CALM AND CARRY ON

I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support).

So if you are still here ? What are you waiting for ?!

 

Find the most frequent unique errors to fix:

grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt

Link to comment
Share on other sites

  • 3 weeks later...

Thanks Chris and Carine for your replies. I finally fix it by doing the following:

 

define('HTTP_SERVER', 'http://www.domain.com');

define('HTTPS_SERVER', 'https://secure.domain.com');

define('ENABLE_SSL', true);

define('HTTP_COOKIE_DOMAIN', 'domain.com');

define('HTTPS_COOKIE_DOMAIN', 'domain.com');

 

Basically setting the cookie domain for HTTP and HTTPS to be the same.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...