Jump to content



Latest News: (loading..)

- - - - -

New install - add to cart not functioning & log-in


This topic has been archived. This means that you cannot reply to this topic.
6 replies to this topic

#1   epwork

epwork
  • Members
  • 42 posts

Posted 25 July 2010 - 06:29 AM

Hi There,

I'm running my osCommerce 2.2rc2a store on WAMP localhost.  Everything seems to be fine expect when i go to add items to cart, it takes me to the cart but gives message "Your shopping cart is empty".  I've tried steps in both IE and FireFox same results.  Also account log-in not working returns to Welcome Guest do you want to log-in.??

I've looked through all the installation guides and made sure products are in stock, store configured. But I am missing something obviously.

I use dreamweaver to edit my PHP files. My WAMP is using PHP 5.3 and MySql 5.1.36   is there some extension I need to activate??  I did install the PHP5.3 add-on and STSv4.6.

Thanks in advance for the help.

#2   geoffreywalton

geoffreywalton

    Contact me for Support

  • Community Sponsor
  • 8,025 posts

Posted 25 July 2010 - 08:39 AM

I'd do a clean install and check the bits that don't work are OK, if they do work it is the changes you have made and a trawl through the support thread for that contribution could help.

G
Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile

Virus Threat Scanner
My Contributions
Basic install answers.
Click here for Contributions / Add Ons.
UK your site.
Site Move.
Basic design info.

For links mentioned in old answers that are no longer here follow this link Useful Threads.

If this post was useful, click the Like This button over there ======>>>>>.

#3   kiskit

kiskit
  • Members
  • 6 posts

Posted 25 July 2010 - 11:26 AM

View Postepwork, on 25 July 2010 - 06:29 AM, said:

Hi There,

I'm running my osCommerce 2.2rc2a store on WAMP localhost.  Everything seems to be fine expect when i go to add items to cart, it takes me to the cart but gives message "Your shopping cart is empty".  I've tried steps in both IE and FireFox same results.  Also account log-in not working returns to Welcome Guest do you want to log-in.??

I've looked through all the installation guides and made sure products are in stock, store configured. But I am missing something obviously.

I use dreamweaver to edit my PHP files. My WAMP is using PHP 5.3 and MySql 5.1.36   is there some extension I need to activate??  I did install the PHP5.3 add-on and STSv4.6.

Thanks in advance for the help.

Same problem here. Have been on the web in search for answers. No luck yet.
The install is clean (just did it), everything is running in localhost, didn't try any fancy SSL stuff. Just installed OSC and can't log customers in (the entry is in the customers table in the database though) and can't add anything to the cart (no entry in the table for that one).
Tried to make cookies mandatory, and it keeps asking me for cookies to be enabled - did it through firefox menus, didn't change a thing.
Running LAMP
PHP 5.3.2
mysql 5.1
no module, no add-on
Help appreciated.

Thanks

Kiskit

#4   Jan Zonjee

Jan Zonjee

    Governor of Peace

  • Core Team
  • 7,042 posts

Posted 25 July 2010 - 12:21 PM

View Postkiskit, on 25 July 2010 - 11:26 AM, said:

Same problem here. Have been on the web in search for answers. No luck yet.
The install is clean (just did it), everything is running in localhost, didn't try any fancy SSL stuff.
Cookies cannot be set if you use localhost in the configure.php files. If you use 127.0.0.1 instead it will work (cookies need at least one dot in the domain).

#5   kiskit

kiskit
  • Members
  • 6 posts

Posted 25 July 2010 - 03:29 PM

View PostJan Zonjee, on 25 July 2010 - 12:21 PM, said:

Cookies cannot be set if you use localhost in the configure.php files. If you use 127.0.0.1 instead it will work (cookies need at least one dot in the domain).

It kind of solves everything. Login and cart are working perfectly.

Thanks mate.

#6   epwork

epwork
  • Members
  • 42 posts

Posted 27 July 2010 - 05:00 AM

View PostJan Zonjee, on 25 July 2010 - 12:21 PM, said:

Cookies cannot be set if you use localhost in the configure.php files. If you use 127.0.0.1 instead it will work (cookies need at least one dot in the domain).

Darn that didn't work for me.  I did a completely new install with database and without any added modules or templates and still not working...  

Is this correct for the cookies: Do I need to add Cookie to Admin/Includes/Configure.php ?

<?php
  define('HTTP_SERVER', 'http://localhost');
  define('HTTPS_SERVER', 'http://localhost');
  define('ENABLE_SSL', false);
  define('HTTP_COOKIE_DOMAIN', '127.0.0.1');
  define('HTTPS_COOKIE_DOMAIN', '127.0.0.1');
  define('HTTP_COOKIE_PATH', '127.0.0.1');        //wasn't sure about these two//
  define('HTTPS_COOKIE_PATH', '127.0.0.1');       //wasn't sure about these two//  
  define('DIR_WS_HTTP_CATALOG', '/testshop.com/');
  define('DIR_WS_HTTPS_CATALOG', '/testshop.com/');
  define('DIR_WS_IMAGES', 'images/');
  define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');
  define('DIR_WS_INCLUDES', 'includes/');
  define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/');
  define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');
  define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');
  define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');
  define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');

  define('DIR_WS_DOWNLOAD_PUBLIC', 'pub/');
  define('DIR_FS_CATALOG', 'C:/wamp/www/testshop.com/');
  define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
  define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

  define('DB_SERVER', 'localhost');
  define('DB_SERVER_USERNAME', 'root');
  define('DB_SERVER_PASSWORD', '');
  define('DB_DATABASE', 'testshop');
  define('USE_PCONNECT', 'false');
  define('STORE_SESSIONS', 'mysql');
?>

#7   Renzov

Renzov
  • Members
  • 5 posts

Posted 08 August 2010 - 09:56 PM

View Postepwork, on 27 July 2010 - 05:00 AM, said:

Darn that didn't work for me.  I did a completely new install with database and without any added modules or templates and still not working...  

Is this correct for the cookies: Do I need to add Cookie to Admin/Includes/Configure.php ?

<?php
  define('HTTP_SERVER', 'http://localhost');
  define('HTTPS_SERVER', 'http://localhost');
  define('ENABLE_SSL', false);
  define('HTTP_COOKIE_DOMAIN', '127.0.0.1');
  define('HTTPS_COOKIE_DOMAIN', '127.0.0.1');
  define('HTTP_COOKIE_PATH', '127.0.0.1');        //wasn't sure about these two//
  define('HTTPS_COOKIE_PATH', '127.0.0.1');       //wasn't sure about these two//  
  define('DIR_WS_HTTP_CATALOG', '/testshop.com/');
  define('DIR_WS_HTTPS_CATALOG', '/testshop.com/');
  define('DIR_WS_IMAGES', 'images/');
  define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');
  define('DIR_WS_INCLUDES', 'includes/');
  define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/');
  define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');
  define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');
  define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');
  define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');

  define('DIR_WS_DOWNLOAD_PUBLIC', 'pub/');
  define('DIR_FS_CATALOG', 'C:/wamp/www/testshop.com/');
  define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
  define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

  define('DB_SERVER', 'localhost');
  define('DB_SERVER_USERNAME', 'root');
  define('DB_SERVER_PASSWORD', '');
  define('DB_DATABASE', 'testshop');
  define('USE_PCONNECT', 'false');
  define('STORE_SESSIONS', 'mysql');
?>

Please correct your config with the following:
  define('HTTP_SERVER', 'http://127.0.0.1');
  define('HTTPS_SERVER', 'http://127.0.0.1');
  define('ENABLE_SSL', false);
  define('HTTP_COOKIE_DOMAIN', '127.0.0.1');
  define('HTTPS_COOKIE_DOMAIN', '127.0.0.1');
  define('HTTP_COOKIE_PATH', '/catalog/');
  define('HTTPS_COOKIE_PATH', '/catalog/');
This will do the trick if you use localhost