Customer manager save event

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!
MikaelNazarenko
Expert
Posts: 274
Joined: 27 Jun 2019, 16:19

Re: Customer manager save event

Post by MikaelNazarenko » 17 Nov 2019, 17:36

Aimeos, thank you for the great support and cooperation! Now seems it works.

My version is:

Code: Select all

aimeos/aimeos-core                    2019.10.x-dev 64b1a38 Full-featured e-commerce components for high performance online shops
When I modify simple filed $customer->isModified() returns true, or if I modify nothing it shows false. It is ok. But it doesn't work as I expected for groups. If I add or delete group to customer it shows always false. How can I solve this situation with groups ?

Thank you so much!

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

Re: Customer manager save event

Post by aimeos » 20 Nov 2019, 17:54

We fixed a bug that prevented removing all groups from a customer. This is available in aimeos/ai-admin-jqadm 2019.10.x-dev. Can you try if it works now also for you?
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

MikaelNazarenko
Expert
Posts: 274
Joined: 27 Jun 2019, 16:19

Re: Customer manager save event

Post by MikaelNazarenko » 20 Nov 2019, 21:42

I was hoping it will work(( but it doesn't (( The log is:

Code: Select all

[20-Nov-2019 21:38:44 UTC] modified: customer.groups :: NULL -> array (
  0 => 1,
)
Packages versions when I tried:

Code: Select all

aimeos/ai-admin-jqadm                 2019.10.x-dev ac5080a Aimeos ai-admin-jqadm extension
aimeos/ai-admin-jsonadm               2019.10.2             Aimeos ai-admin-jsonadm extension
aimeos/ai-client-html                 2019.10.8             Aimeos ai-client-html extension
aimeos/ai-client-jsonapi              2019.10.1             Aimeos JSON API extension
aimeos/ai-controller-frontend         2019.10.3             Aimeos ai-controller-frontend extension
aimeos/ai-controller-jobs             2019.10.3             Aimeos ai-controller-jobs extension
aimeos/ai-gettext                     2019.10.1             Aimeos Gettext extension
aimeos/ai-laravel                     2019.10.2             Laravel adapter for Aimeos web shops and e-commerce solutions
aimeos/ai-payments                    2019.10.1             Payment extension for Aimeos web shops and e-commerce solutions
aimeos/ai-swiftmailer                 2019.10.1             SwiftMailer adapter for Aimeos web shops and e-commerce solutions
aimeos/aimeos-core                    2019.10.5             Full-featured e-commerce components for high performance online shops
aimeos/aimeos-laravel                 2019.10.1             Professional, full-featured and high performance Laravel e-commerce package for online shops and complex B2B projects
I also executed

Code: Select all

composer clearcache
to grab fresh files...

I ask you and hope it will be fixed soon..

Thank you!

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

Re: Customer manager save event

Post by aimeos » 21 Nov 2019, 14:15

You also need: aimeos/aimeos-core 2019.10.x-dev
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

MikaelNazarenko
Expert
Posts: 274
Joined: 27 Jun 2019, 16:19

Re: Customer manager save event

Post by MikaelNazarenko » 21 Nov 2019, 15:37

Yes now it works! But is I modify groups $customer->isModified() returns false; How can I check if groups were modified ? I mean add or remove groups from customer ?

I need it for all related customer objects. Yes I can loop through objects and check if object was modified for example address. But can I check if address was deleted or added to customer ? Not only address or another property. Because if for example address was deleted from customer it means customer was modified..

And can I use those versions in live project ? Those dev versions are ok ?

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

Re: Customer manager save event

Post by aimeos » 21 Nov 2019, 17:34

MikaelNazarenko wrote: 21 Nov 2019, 15:37 Yes now it works! But is I modify groups $customer->isModified() returns false; How can I check if groups were modified ? I mean add or remove groups from customer ?
There was a setModified() call in setGroups() missing. That's fixed now.
MikaelNazarenko wrote: 21 Nov 2019, 15:37 I need it for all related customer objects. Yes I can loop through objects and check if object was modified for example address. But can I check if address was deleted or added to customer ? Not only address or another property. Because if for example address was deleted from customer it means customer was modified..
Use those methods to get deleted items:

Code: Select all

$item->getAddressItemsDeleted();
$item->getListItemsDeleted();
$item->getPropertyItemsDeleted();
MikaelNazarenko wrote: 21 Nov 2019, 15:37 And can I use those versions in live project ? Those dev versions are ok ?
Yes, 2019.10.x-dev only contains the bugfixes for the LTS branch that are not yet tagged.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

MikaelNazarenko
Expert
Posts: 274
Joined: 27 Jun 2019, 16:19

Re: Customer manager save event

Post by MikaelNazarenko » 21 Nov 2019, 22:17

Aimeos, thank you so much! It works like I wanted! )

Post Reply