[SOLVED] Where can I find the Customer tables on DB?

How to configure and adapt Aimeos based shops as developer
Forum rules
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
alababdiy
Posts: 40
Joined: 30 Apr 2023, 12:46

[SOLVED] Where can I find the Customer tables on DB?

Post by alababdiy » 06 Nov 2023, 17:37

I'm trying to locate the specific table where shop customer information is stored. Could anyone advise on the table name dedicated to shop customers' data?

I have identified several tables related to customers (listed below), but they all seem to be empty, despite having registered customers.

Code: Select all

+------------------------------+
| table_name |
+------------------------------+
| mshop_customer |
| mshop_customer_address |
| mshop_customer_group |
| mshop_customer_list |
| mshop_customer_list_type |
| mshop_customer_property |
| mshop_customer_property_type |
+------------------------------+

Code: Select all

$cntl = \Aimeos\Controller\Frontend::create( $context, 'customer' );
These tables should contain information about customers who signed up using the shop site ?
Last edited by alababdiy on 14 Nov 2023, 08:45, edited 1 time in total.

User avatar
aimeos
Administrator
Posts: 7895
Joined: 01 Jan 1970, 00:00

Re: Where can I find the Customer tables on DB?

Post by aimeos » 10 Nov 2023, 07:56

If you are using Laravel, the customer records are stored in the users* tables.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

alababdiy
Posts: 40
Joined: 30 Apr 2023, 12:46

Re: Where can I find the Customer tables on DB?

Post by alababdiy » 12 Nov 2023, 08:30

What does 'customer.id' refer to?
after i insert new user :

Code: Select all

$context->db()->insert(
            'users',
            [
                'firstname' => $firstname,
                'lastname' => $lastname,
                'name' => $name,
                'mobile' => $mobile,
                'password' => Hash::make($password),
                'siteid' => $siteid,                
                'mobile_verified_at' => date('Y-m-d H:i:s')
            ]
        );
then try visit {{site}}/profile got this error
[2023-11-12 11:25:52] local.ERROR: Item with ID "16" in "customer.id" not found {"userId":16,"exception":"[object] (Aimeos\\MShop\\Exception(code: 404): Item with ID \"16\" in \"customer.id\" not found at ./vendor/aimeos/aimeos-core/src/MShop/Common/Manager/DB.php:631)

User avatar
aimeos
Administrator
Posts: 7895
Joined: 01 Jan 1970, 00:00

Re: Where can I find the Customer tables on DB?

Post by aimeos » 14 Nov 2023, 08:00

Most likely your siteid value doesn't match. The site ID (e.g. "1.") must be the one of the site code (e.g. "default") which you use in your URL (because of "{site}/..."). If you want customers to be available in all sites, you can also use an empty string as site ID value.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

alababdiy
Posts: 40
Joined: 30 Apr 2023, 12:46

Re: Where can I find the Customer tables on DB?

Post by alababdiy » 14 Nov 2023, 08:45

Thanks @aimeos, your latest answer inspired me to understand where the problem is. Now I know that the format of the site ID is:

Code: Select all

siteid => $siteid."."

Post Reply