Skip to content

Added possibility to set options #546

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

Conversation

ProkopovVitaliy
Copy link
Contributor

Description (*)

Added possibility set options. We can add options only if input type selected multi-select or select and didn’t set source model.
For example in this case we can’t see options pane:
Screenshot 2021-04-14 at 19 38 09

If we set source model as Without Source Model we can see options panel here:
Screenshot 2021-04-14 at 19 38 31

Now try to set options without sort orders:

Screenshot 2021-04-14 at 19 39 31

After generation we will see next data patch file:

Screenshot 2021-04-14 at 19 40 07

After bin/magento setup:upgrade command execution let's check the attribute in admin panel:

Screenshot 2021-04-14 at 19 42 24

As we can see, product options works as we expected. On the product edit page it works as expected also:

Screenshot 2021-04-14 at 19 45 08

Let's do the same but with sort ordered option:

Screenshot 2021-04-14 at 19 57 42

Generated file:

Screenshot 2021-04-14 at 19 59 16

Attribute in admin panel:

Screenshot 2021-04-14 at 20 00 56

Screenshot 2021-04-14 at 20 01 42

Fixed Issues (if relevant)

  1. Fixes Adding options during eav attribute generation #545

Questions or comments

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with integration/functional tests (if applicable)
  • All automated tests passed successfully (all builds are green)

…options

# Conflicts:
#	resources/fileTemplates/internal/Magento Eav Attribute Data Patch Class.php.ft
#	src/com/magento/idea/magento2plugin/actions/generation/dialog/NewEavAttributeDialog.form
#	src/com/magento/idea/magento2plugin/actions/generation/dialog/NewEavAttributeDialog.java
#	src/com/magento/idea/magento2plugin/actions/generation/generator/util/eav/ProductAttributeMapper.java
#	src/com/magento/idea/magento2plugin/magento/packages/eav/EavAttribute.java
#	tests/com/magento/idea/magento2plugin/actions/generation/generator/EavAttributeSetupPatchGeneratorTest.java
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.

3 participants