Modify users table

Help for integrating the Laravel package
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
yong
Posts: 43
Joined: 10 Apr 2019, 12:55

Modify users table

Post by yong » 22 Jul 2019, 16:39

I want to modify users Item managers class ! but the createItemBase() function is ambiguous !

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

Re: Modify users table

Post by aimeos » 22 Jul 2019, 20:46

What do you mean resp. what's the exact problem?
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

yong
Posts: 43
Joined: 10 Apr 2019, 12:55

Re: Modify users table

Post by yong » 23 Jul 2019, 07:40

In the Standard item class there is not createItemBase it's only createItem which extends the createItemBase of the Base Class ! So when i tried to extends the createItem Class i got some errors and when i tried the createItemBase of the Base class instead of the standard one, i have some errors too !
In fact when i execute the artisan aimeos:account i got some errors !
Capturex.PNG
Capturex.PNG (11.56 KiB) Viewed 2635 times

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

Re: Modify users table

Post by aimeos » 23 Jul 2019, 08:20

Can you please post your customer manager and item class?
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

yong
Posts: 43
Joined: 10 Apr 2019, 12:55

Re: Modify users table

Post by yong » 23 Jul 2019, 08:35

Manager.PNG
Manager.PNG (28.8 KiB) Viewed 2632 times
Item.PNG
Item.PNG (27.63 KiB) Viewed 2632 times

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

Re: Modify users table

Post by aimeos » 23 Jul 2019, 09:23

Which Aimeos version are you using? Seems like 2018.10 but "parent::__contstruct()" parameters seem to be 2019.x
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

yong
Posts: 43
Joined: 10 Apr 2019, 12:55

Re: Modify users table

Post by yong » 23 Jul 2019, 09:31

t is 2018.10

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

Re: Modify users table

Post by aimeos » 23 Jul 2019, 09:34

parent::__construct() must have the same parameters and orders as the __construct() method of your class
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

yong
Posts: 43
Joined: 10 Apr 2019, 12:55

Re: Modify users table

Post by yong » 23 Jul 2019, 09:54

I arranged the parameters ! but now it seem like it don't match the configuration i've done in the mshop.php with the table 'users' not the table 'customers' the error is related number of the binding which don't match with the 'customers' config instead of my 'users' config ;


Aimeos\MW\DB\Exception : Number of binds (37) doesn't match the number of markers in "
INSERT INTO "mshop_customer" (


My mshop.php :
'customer' => [
'manager' => [
'name' => 'Myproject',
'laravel' => array(
'delete' => array(
'ansi' => '
DELETE FROM "users"
WHERE :cond
',
),
'insert' => array(
'ansi' => '
INSERT INTO "users" (
"siteid", "name", "company", "vatid", "salutation", "title",
"firstname", "lastname", "address1", "address2", "address3",
"postal", "city", "state", "countryid", "langid", "telephone",
"telefax", "website", "email", "longitude", "latitude", "label",
"birthday", "status", "vdate", "password",
"updated_at", "editor", "created_at","prenom", "civilite", "contact", "compagnie",
"naissance", "profession", "pseudo"
) VALUES (
?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?
)
',
),

yong
Posts: 43
Joined: 10 Apr 2019, 12:55

Re: Modify users table

Post by yong » 23 Jul 2019, 16:00

I fixed issues ! But now i've this exception when i try to insert a user via the command artisan aimeos:setup :
Aimeos\MW\DB\Exception : SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails ("agri-business"."mshop_customer_list", CONST
RAINT "fk_mscusli_pid" FOREIGN KEY ("parentid") REFERENCES "mshop_customer" ("id") ON DELETE CASCADE ON UPDATE CASCADE)

Post Reply