User groups

Questions around the TYPO3 integration and plugins
Forum rules
Always add your TYPO3, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
User avatar
JariVäätäinen
Posts: 10
Joined: 20 Nov 2019, 14:13

User groups

Post by JariVäätäinen » 17 Dec 2019, 15:34

Hi,
my cms is Typo3 9.5.9 and Aimeos version 19.10.2.

I have problems with Aimeos customer groups and Users folder.
When a new user makes an order, she will get an email about her new customer account and password.
In that process Aimeos creates a new user account to the Users "folder" and to Aimeos Customers panel.

When I look at the Users folder, it has red exclamation marks telling that I should add the new user to some user group. The problem is that there is any available user groups in Available Items box.

Then if I try to make a new usergroup in Aimeos backend Groups and select it in Customers User groups box, the user will disappear from the Users folder! Of course after that the users cannot login anymore.

Why there is two places for users data in Typo3 Aimeos and what are the differences between them? How can I add a user to a user group without losing her/him?

Jari

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

Re: User groups

Post by aimeos » 18 Dec 2019, 07:38

If you've installed the extension and the page tree (not the distribution) there might have been no groups created. You can add groups by going to the "List" module, add a sysfolder "Groups" and create a new group which you can assign to customers afterwards. You can also tell Aimeos that it should assign that group to all newly created customers by adding this in the TypoScript extension template:

Code: Select all

plugin.tx_aimeos.settings.controller.frontend.customer.groupids = <page ID of group sysfolder>
The reason that there are two ways to manage customers is that TYPO3 has it's own way but can't manage the additional fields created required by Aimeos. Now, there's the problem hat TYPO3 stores user records in the fe_users table but requires a pageid (column "pid") for each record. In the TypoScript template, you can set it with:

Code: Select all

plugin.tx_aimeos.settings.mshop.customer.manager.typo3.pid-default = <page ID of user sysfolder>
Unfortunatly, this is only for the frontend and if you save a user/customer in the Aimeos admin interface, this setting isn't made available for the Aimeos backend by TYPO3, so that value will be NULL and the original value is removed from the user record. To make sure it's also available in the TYPO3 backend, you need to create a new Aimeo extension (https://aimeos.org/extensions) and add a PHP configuration file in ./Resources/Private/Config/mshop.php including this content:

Code: Select all

<?php
return [
	'customer' => [
		'manager' => [
			'typo3' => [
				'pid-default'' => <page ID of user sysfolder>
			],
			'group' => [
				'typo3' => [
					'pid-default'' => <page ID of group sysfolder>
				]
			]
		]
	]
];
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

User avatar
JariVäätäinen
Posts: 10
Joined: 20 Nov 2019, 14:13

Re: User groups

Post by JariVäätäinen » 19 Dec 2019, 08:47

Thank you very much for the informative answer!

I have now done the changes you advised, but there seem to be some error with the mshop.php code in the new extension. I get this error in the front-end:
ParseError.png
ParseError.png (61.98 KiB) Viewed 5215 times
Jari

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

Re: User groups

Post by aimeos » 20 Dec 2019, 14:30

There was a comma missing:

Code: Select all

<?php
return [
	'customer' => [
		'manager' => [
			'typo3' => [
				'pid-default'' => <page ID of user sysfolder>
			],
			'group' => [
				'typo3' => [
					'pid-default'' => <page ID of group sysfolder>
				]
			]
		]
	]
];
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

promptnet
Posts: 61
Joined: 24 Jul 2019, 12:22

Re: User groups

Post by promptnet » 18 Jan 2022, 08:06

Hi, I've got the same problem on an update with TYPO3 10.4.21 and Aimeos 21.10.3.
Though, I inserted all the codes, all users and groups are shown in the Aimeos administration.
I inserted

Code: Select all

plugin.tx_aimeos.settings.controller.frontend.customer.groupids = 48
plugin.tx_aimeos.settings.mshop.customer.manager.typo3.pid-default = 171
and created a file mshop.php in ./Resources/Private/Config/.
Does this change with Aimeos 21?
Thanks, Kurt

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

Re: User groups

Post by aimeos » 19 Jan 2022, 12:42

There's no change for that in 2021.x AFAIK but you need to have that configuration in ./Resources/Private/Config/mshop.php and ./Resources/Private/Config/controller.php of your project-specific Aimeos TYPO3 extension.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

promptnet
Posts: 61
Joined: 24 Jul 2019, 12:22

Re: User groups

Post by promptnet » 19 Jan 2022, 15:08

Unfortunately, that is not working. Still the same.
Do you need some information?

promptnet
Posts: 61
Joined: 24 Jul 2019, 12:22

Re: User groups

Post by promptnet » 17 Feb 2022, 13:47

Can anybody help on that topic? Still not working with ./Resources/Private/Config/mshop.php and ./Resources/Private/Config/controller.php ...

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

Re: User groups

Post by aimeos » 18 Feb 2022, 13:03

Can you show your PHP configuration files where you've added the settings?
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

promptnet
Posts: 61
Joined: 24 Jul 2019, 12:22

Re: User groups

Post by promptnet » 21 Feb 2022, 13:51

config.png
config.png (18.53 KiB) Viewed 3417 times
Like so ?

Post Reply