Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User profile bug #243

Open
cvetko12 opened this issue Mar 12, 2025 · 2 comments
Open

User profile bug #243

cvetko12 opened this issue Mar 12, 2025 · 2 comments

Comments

@cvetko12
Copy link

While using user profile (fe_users), if you save payment address, it will create empty delivery address.
My best guess is that both save buttons have the same name tag (ai[address][save]), or it could be ignoring the ID that is in form data:

ai[address][payment][customer.firstname]: Name
ai[address][payment][customer.lastname]: Surename
ai[address][payment][customer.company]:
ai[address][payment][customer.address1]: Addr
ai[address][payment][customer.city]: City
ai[address][payment][customer.postal]: 123123
ai[address][payment][customer.countryid]: EN
ai[address][payment][customer.languageid]: en
ai[address][payment][customer.email]: [email protected]
ai[address][payment][customer.telephone]: 012301230123
ai[address][save]: 1
ai[address][delivery][1][customer.address.firstname]:
ai[address][delivery][1][customer.address.lastname]:
ai[address][delivery][1][customer.address.company]:
ai[address][delivery][1][customer.address.address1]:
ai[address][delivery][1][customer.address.city]:
ai[address][delivery][1][customer.address.postal]:
ai[address][delivery][1][customer.address.countryid]:
ai[address][delivery][1][customer.address.languageid]: en
ai[address][delivery][1][customer.address.telephone]:

@cvetko12
Copy link
Author

For anyone else having the same problem, I fixed it by adding this code in typo3conf/ext/aimeos/Resources/Libraries/aimeos/ai-client-html/src/Client/Html/Account/Profile/Standard.php init() function
``php

$check_keys = [
	'customer.address.firstname',
	'customer.address.lastname',
	'customer.address.company',
	'customer.address.address1',
	'customer.address.city',
	'customer.address.postal',
	'customer.address.countryid',
	'customer.address.telephone',
];

foreach($map as $key => $cleanup) {
	$remove = true;
	foreach($check_keys as $check_key) {
		if(!empty($cleanup[$check_key])) {
			$remove = false;
			break;
		}
	}

	if($remove) {
		unset($map[$key]);
	}
}

``

I'm not sure if this problem is only with my setup or if its actually a bug in account/profile module, but it seems like its always posting address-delivery-new form and inserting it even if its empty.

@aimeos
Copy link
Owner

aimeos commented Mar 12, 2025

Thank you for your bug report!
The problem is that the fields are not disabled and sent by the browser and we will check why that happens.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants