aimeos / aimeos-core

Aimeos PHP e-commerce framework for ultra fast online shops, scalable marketplaces, complex B2B applications and #gigacommerce

Home Page:https://aimeos.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

jsonapi/customer returns 404 with filled "mshop/customer/manager/name" setting.

Tantacula opened this issue · comments

I've tried to add my own customer manager to mshop.php:

    'customer' => [
        'manager' => [
            'name' => 'Manager'
        ],
    ],

but api method jsonapi/customer returns error" 404: Item with ID "8" in "customer.id" not found" with this setting.

This error also appears if I set default "Standard" name (file Standard.php not exists in my theme)

    'customer' => [
        'manager' => [
            'name' => 'Standard'
        ],
    ],

php 8
Laravel v9.52.1
"aimeos/aimeos-core": "2022.10.x-dev",
"aimeos/aimeos-laravel": "~2022.10",

Is the customer with ID "8" in the users table assigned to the site (-> users.siteid) you are trying to fetch?

No. I added "1." to siteid field now and nothing changed.

If it was empty before, this means that the customer is available in all sites.

Change logging in config/shop.php to 7 so all SQL queries are logged and check the query for the mshop_customer table why it returns no record.

The problem that is without this option query uses "users" table (Laravel default table) and with this option table changes to mshop_customer which is empty.

I think problem is solved now, I should extend Laravel manager instead Standard Aimeos manager.