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

Magento 2.4.5 #147

Open
wfnicolacantarutti opened this issue Jul 24, 2023 · 0 comments
Open

Magento 2.4.5 #147

wfnicolacantarutti opened this issue Jul 24, 2023 · 0 comments

Comments

@wfnicolacantarutti
Copy link

Dear support,
we met a problem with the field mapping of the gender attribute to Magento.
When a customer logs in, even if the values get correctly modified into Observer/DefaultCMSSyncFieldMapping.php ,

switch ($gigyaProfile->getGender()) {
				case 'm':
					$customer->setGender('1');
					break;

				case 'f':
					$customer->setGender('2');
					break;

				default:
					$customer->setGender('3');
			}

the value that gets saved into Magento is 0.

I found out that in Model/MagentoCustomerFieldsUpdater.php the method setAccountValues(), even if the correct account with modified values gets passed as a parameter, in the following piece of code you take the value from Gigya account

foreach ($gigyaMapping as $gigyaName => $confs) {
           /** @var \Gigya\GigyaIM\Helper\CmsStarterKit\fieldMapping\ConfItem $conf */
           $value = parent::getValueFromGigyaAccount($gigyaName); // e.g: loginProvider = facebook

to set it later.
In the case of gender attribute this causes the 'm', 'f' or 'u' values to get set into Magento that do not recognize them and sets 0.

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

1 participant