Strange entries in the Customer DB table

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
12 years ago
Since the very beginning of usage of nopCommerce 2.1 (1.9 was used before) noticed that each new customer gets ID which is much greater then the previous customer got. Did not care about it much but a minute ago I had a look at that table in SQL Server manager and found that the table is full of records where only ID and GUID fields are valid, the most of other have NULL values, however the LanguageId field is also filled with valid values. Got several dozens of such records per a real customer.
12 years ago
see https://www.nopcommerce.com/boards/t/11434/sql-guest-users.aspx
12 years ago
New York wrote:
see https://www.nopcommerce.com/boards/t/11434/sql-guest-users.aspx


Thank you.
However, in that discussion the following is stated: "That being said, by default, a check is made each hour to delete guest accountst that have been inactive for 24 hours", which does not seem to be the case in my setup. Shopping carts seem to stay in the DB forever as well. Since I have no idea where the according setting resides  - it should have the default value in my setup. BTW, where is it?
12 years ago
web.config

    <!--run each 10 minutes: 60*10=600-->
    <Thread seconds="600">
      <task name="DeleteGuestsTask" type="Nop.Services.Customers.DeleteGuestsTask, Nop.Services" enabled="true" stopOnError="false" olderThanMinutes="1440" />
    </Thread>
        
note this
http://nopcommerce.codeplex.com/SourceControl/changeset/changes/6cdf9a26e8b3#src%2fPresentation%2fNop.Web%2fWeb.config
(above is a recent changeset.  2.1 default is 1 hour.  the typo in comments for changeset about 10 min has been subsequently fixed in another changeset)

However, if the setting is not in web.config, then it looks like time is 1 day

src\Libraries\Nop.Services\Customers\DeleteGuestsTask.cs

namespace Nop.Services.Customers
{
    /// <summary>
    /// Represents a task for deleting guest customers
    /// </summary>
    public partial class DeleteGuestsTask : ITask
    {
        private int _olderThanMinutes = 1440; //60*24 = 1 day
...
            _customerService.DeleteGuestCustomers(null, DateTime.UtcNow.AddMinutes(-_olderThanMinutes), true);


        
Based on the 'true' param to DeleteGuestCustomers, guests will not be deleted if they have shopping carts items.

I see DeleteExpiredShoppingCartItems in ShoppingCartService, but nothing seems to call it
12 years ago
The code listed

<Thread seconds="600">
        <task name="DeleteGuestsTask" type="Nop.Services.Customers.DeleteGuestsTask, Nop.Services" enabled="true" stopOnError="false" olderThanMinutes="1440"/>
      </Thread>

Appears to be related specifically to version 2.1

Is there a task established for version 1.9?  Or do we clean the table with our own custom procedures?
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.