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

Add cast to string for CUST_GROUP_ALL #10475

Merged
merged 1 commit into from
Aug 11, 2017
Merged

Add cast to string for CUST_GROUP_ALL #10475

merged 1 commit into from
Aug 11, 2017

Conversation

mashb1t
Copy link
Member

@mashb1t mashb1t commented Aug 9, 2017

Add cast to string for GroupInterface::CUST_GROUP_ALL in customer group source model and adjust test

Fixes #10436

Add cast to string for GroupInterface::CUST_GROUP_ALL in customer group source model

Fixes #10436
@ishakhsuvarov ishakhsuvarov self-assigned this Aug 9, 2017
@ishakhsuvarov ishakhsuvarov added this to the August 2017 milestone Aug 9, 2017
@ishakhsuvarov
Copy link
Contributor

@mash1t Thank you for your PR. Could you please be more precise on the steps to reproduce the issue? I understand the concept, but have to verify the current behavior first.

@orlangur
Copy link
Contributor

@ishakhsuvarov

When using the result of \Magento\Customer\Model\Customer\Source\Group::toOptionArray as options in an (multiselect) attribute source model, the respective customer group CUST_GROUP_ALL is not getting selected in the Magento Admin-Panel despite the value of the group being set.

from issue claimed as fixed looks pretty much like StR. The question is do you observe the same behavior or not.

@mashb1t
Copy link
Member Author

mashb1t commented Aug 10, 2017

@ishakhsuvarov Currently i use a source model for a multiselect product attribute using the return value of app/code/Magento/Customer/Model/Customer/Source/Group.php::toOptionArray in its method getAllOptions as options.
The problem occurs when editing and saving the product in the backend with the attribute being set to value 32000 (int) => "ALL GROUPS".

  • After saving the product the new value of the attribute value for the product is updated in the database (attribute type being text) but does not get preselected in the backend, because it is of type int instead of string.
  • Every other customer group selected and saved will be preselected in the backend.

I guess that knockout only preselects values of the same data type.

@magento-team magento-team merged commit 9558840 into magento:develop Aug 11, 2017
@orlangur orlangur mentioned this pull request Aug 13, 2017
4 tasks
@mashb1t mashb1t deleted the patch-1 branch August 14, 2017 11:29
magento-team pushed a commit that referenced this pull request Oct 10, 2017
Fixed issues:
- MAGETWO-71552: Attribute values on store view level not searchable - for 2.2
- MAGETWO-72866: Redundant indexers invalidation - RIATCS-340
- MAGETWO-75458: [Backport] - Fix overwrite default value image/file with NULL #10253 - for 2.2
- MAGETWO-75460: [Backport] - LowestPriceOptionsProvider returns products without attributes which are used for price calculation (e.g. tax adjustment)
- MAGETWO-80193: [2.2.x] - Add cast to string for CUST_GROUP_ALL #10475
- MAGETWO-80204: [2.2.x] - Grammar fix for #9533 #10627
- MAGETWO-71549: Impossible to export Advanced Prices on a medium profile
- MAGETWO-80198: [2.2.x] - Fix issue #10565 #10575
- MAGETWO-80197: [2.2.x] - Fix JS translation search #10445
- MAGETWO-80195: [2.2.x] - Send different base currency in Google analytics #10508
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants