osCommerce and osCMax shopping cart software forums

Shopping Cart Software

osCommerce with teeth!

 
 

Customer data errors after order # 1000

This is a discussion on Customer data errors after order # 1000 within the osCMax v2 Installation issues forums, part of the osCMax v2.0 Forums category; After reaching order number 1000 I have had some strange things happening. Examples: A customer creates an account, places order, ...


Go Back   osCommerce and osCMax shopping cart software forums > osCMax v2.0 Forums > osCMax v2 Installation issues

Register FAQ Members List Calendar Mark Forums Read


Free community membership! Fast easy FREE membership
Closed Thread

 

LinkBack Thread Tools
  #1  
Old 03-28-2007, 12:47 PM
osCMax Testing Team
 
Join Date: Nov 2006
Location: Southern New Jersey
Posts: 35
Thanks: 4
Thanked 1 Time in 1 Post
Rep Power: 0
Bassmaster
Default Customer data errors after order # 1000

After reaching order number 1000 I have had some strange things happening.

Examples:

A customer creates an account, places order, logs out and returns to place a second order, their address has changed to the customer who create an account after them. The Shipping and billing address, email address and phone number. When they try log in to the account the see the other persons address information. This has happened 4 times since order #1000. Never had anything like this happen before. Are there any issues I need to address.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Sponsored Links
Advertisement
  #2  
Old 03-28-2007, 09:55 PM
michael_s's Avatar
osCMax Developer

 
Join Date: Jul 2002
Location: Phoenix, AZ
Posts: 10,548
Thanks: 76
Thanked 335 Times in 314 Posts
Rep Power: 10
michael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond repute
Default Re: Customer data errors after order # 1000

Nothing to do with order number... you have hardcoded session ID's somewhere in your custom html on your site.

This will have all new customers using the same session, so they will see others info if they come on to the site before the session times out. Get rid of all hardcoded session id's from your custom html and the problem will go away...
__________________
Michael Sasek
osCMax Developer


  • osCMax Templates - Hundreds of premium quality templates designed for osCMax 2. Loyalty discounts up to 30% off!
    Each purchase supports the osCMax project with much needed funds!

  • xShop for osCMax - Windows Based osCMax administration. Improved workflow, security, speed and convenience.

  • osCMax Hosting - From basic hosting to High Availability, Load Balanced arrays, the most experienced osCMax host. Default multi server configuration for exceptional performance!

  • osCMax Template Tutorial - Learn how to make your own custom templates and how to use the powerful features of the osCMax template system.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #3  
Old 03-29-2007, 11:55 AM
osCMax Testing Team
 
Join Date: Nov 2006
Location: Southern New Jersey
Posts: 35
Thanks: 4
Thanked 1 Time in 1 Post
Rep Power: 0
Bassmaster
Default Re: Customer data errors after order # 1000

Thanks for the reply Michael. I spent 8 hours looking today and could not find any session ids hard coded anywhere. I checked the define main page and all products related to the mixed up customers and check all products added since order # 1000. I am very careful not to include session ids in anything I post. Could it be something else or could it be related to something else, Like could it be related to affiliate programs? I looked and looked but cant find one session id.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #4  
Old 03-29-2007, 03:33 PM
michael_s's Avatar
osCMax Developer

 
Join Date: Jul 2002
Location: Phoenix, AZ
Posts: 10,548
Thanks: 76
Thanked 335 Times in 314 Posts
Rep Power: 10
michael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond repute
Default Re: Customer data errors after order # 1000

Send me a link to the site. That is what it is for sure. It is a session ID posted in a link somewhere. It cannot be anything else, as that is the only way one session info can show up in multiple browsers.

They are both using the same session ID, and since PHP randomly generates them, the only way is if they are linking in with a hardcoded session ID somewhere.
__________________
Michael Sasek
osCMax Developer


  • osCMax Templates - Hundreds of premium quality templates designed for osCMax 2. Loyalty discounts up to 30% off!
    Each purchase supports the osCMax project with much needed funds!

  • xShop for osCMax - Windows Based osCMax administration. Improved workflow, security, speed and convenience.

  • osCMax Hosting - From basic hosting to High Availability, Load Balanced arrays, the most experienced osCMax host. Default multi server configuration for exceptional performance!

  • osCMax Template Tutorial - Learn how to make your own custom templates and how to use the powerful features of the osCMax template system.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #5  
Old 04-11-2007, 01:27 PM
osCMax Testing Team
 
Join Date: Nov 2006
Location: Southern New Jersey
Posts: 35
Thanks: 4
Thanked 1 Time in 1 Post
Rep Power: 0
Bassmaster
Default Re: Customer data errors after order # 1000

Hello Michael,

I deleted the links we thought were causing the problems from the main page and everything seemed fine for a few days. However today it happened again. I had two customers contact me and said after they click to my site from Froogle, they were able to see someone else's account. So I think there may be a problem with the Froogle feed. I tried to recreate the problem but was unsuccessful. Do you have any thought on this new information? Are sessions necessary?

Thanks
CW
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #6  
Old 04-12-2007, 09:54 AM
Member
 
Join Date: Mar 2003
Posts: 77
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
ganast
Default Re: Customer data errors after order # 1000

This is very interesting to me as I have had similar issues and cannot figure out how.

Interestingly mine happened another way... in some cases a Pay Without Account customer would not checkout for a while... then (partly because of code that I contributed here: 062: Can create a customer account with the same email address as a 'MIA' PWA account - Bug Tracker - open source Commerce Maximized :: osCMax) the customer's info would often be deleted...

Because of this the orders.php class would return a completely blank set of variables. This would occasionally result in a "blank order" where the order was submitted but there was no contact information... however, after some other change I made (could be a hard coded sessid... but I don't think so) it resulted in customers getting the $order->customer[] info from a different customer written to their TABLE_ORDERS record!

It took me a lot of work to figure out what was happening... I still don't understand how the record was getting messed up. I do, however, have a preliminary fix that looks like this:

Every time the order class is instantiated I check to see if it is empty... if so I unregister a bunch of session variables and send the user back to login with a time out error... unfortunately this is all in a cart that only uses PWA... It is also an oscmax1.7 cart with PWA .71... so I need some comment from others. Here are the code changes:

File includes/classes/order.php
Changed the constructor as follows:
Code:
    function order($order_id = '') {
      $this->info = array();
      $this->totals = array();
      $this->products = array();
      $this->customer = array();
      $this->delivery = array();

      if (tep_not_null($order_id)) {
        $this->query($order_id);
      } else {
        $this->cart();
      }
          // BOF: FyreEngine change made on 4/10/2007 to identify customer records that have been deleted.
          $this->no_data = false;
          if ($this->customer['firstname'] == '') {
            $this->no_data = true;
          }
          // EOF: 4/10/2007
    }
Then each place the order class is instantiated this:

Code:
// BOF: FyreEngine 4/10/2007 identify missing customer records...
  if ($order->no_data == true) {
    tep_session_unregister('customer_id');
    tep_session_unregister('customer_first_name');
    tep_session_unregister('customer_default_address_id');
    tep_session_unregister('customer_country_id');
    tep_session_unregister('customer_zone_id');
    tep_session_unregister('newsletter'); // FyreEngine variable add 3/27/2007
    tep_session_unregister('noaccount');
    tep_session_unregister('sendto');
    tep_session_unregister('cartID');
    tep_session_unregister('comments');
    tep_session_unregister('shipping');
    tep_session_unregister('billto');
    tep_session_unregister('payment');
    tep_session_unregister('comments');
    $navigation->set_snapshot(array('mode' => 'SSL', 'page' => FILENAME_CHECKOUT_PAYMENT)); // you can change this or leave it out...
    tep_redirect(tep_href_link(FILENAME_LOGIN, 'login=fail&reason=' . urlencode('If you don\'t complete your order within 30 minutes, your personal information is reset. Please enter it again to complete your order.'), 'SSL'));
  }
// EOF: FyreEngine 4/10/2007
Interestingly, this not only fixed the blank orders issue, it completely fixed the situation where customer A would get customer B's $order->customer information written to their TABLE_ORDERS record.

--gabe
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #7  
Old 04-12-2007, 11:53 AM
osCMax Testing Team
 
Join Date: Nov 2006
Location: Southern New Jersey
Posts: 35
Thanks: 4
Thanked 1 Time in 1 Post
Rep Power: 0
Bassmaster
Default Re: Session ID Problems (Updated with fix)

I found this article on the net which is my exact problem.

MySQL DBA: OSCommerce Orders Mixing Up / Sessions Being Stolen


After doing a search on Google for my url I found many links with osCsid=8ac when I click those link Walla I am in someones account.

I also did a complete search of my store database and only found one hit for that session id which was "whos online" So its not hard coded anywhere on my site.


Sessions are set to the following

Session Directory /tmp
Force Cookie Use False
Check SSL Session ID False
Check User Agent False
Check IP Address False
Prevent Spider Sessions False
Recreate Session True

So my question is what do I do now. Can I block that session id? I am at a complete loss and its really starting to cause big problems for my store.

FIX: Michael informed me the problem was a session setting:

Prevent Spider Sessions False

Should be set to True. I have made the changes and the problem will go away when the spiders update my site. Since I used "Recreate Sessions" customer Sessions have been updated so it is no longer an issues.

Thanks Michael. I appreciate your time.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Sponsored Links
Advertisement
Closed Thread

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
Export all order data to a csv file 1.0 michael_s New osCommerce Contributions 0 01-31-2007 03:03 PM
how to place an order for a customer? pal osCMax v1.7 Discussion 2 05-10-2005 06:29 AM
How do I import data from previous version data base? rondgray osCMax v1.7 Discussion 1 12-18-2004 11:24 PM
Migrating data over from osc MS2 getting ERRORS HELP!! FilmDirector osCMax v1.7 Installation 7 05-10-2004 12:06 PM
customer comments in order and extra order email karen_l osCommerce 2.2 Modification Help 0 01-03-2003 10:51 AM


All times are GMT -8. The time now is 12:24 PM.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO
http://www.oscmax.com/forums/
Copyright 2008 osCMax