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

Always add magento2 api configuration #2036

Merged
merged 1 commit into from
Nov 29, 2018
Merged

Always add magento2 api configuration #2036

merged 1 commit into from
Nov 29, 2018

Conversation

Cyclonecode
Copy link
Collaborator

Related issues

#1847
#1842
vuestorefront/mage2vuestorefront#29 (comment)

Short description and why it's useful

The magento2.imgUrl and also the magento2.api.* should always be stored in configuration.
If not the default backend (https://demo.vuestorefront.io) is used, then the user will be asked to supply the magento2 url and also choose to setup credentials and import data to elasticsearch. If the user does not choose to setup credentials, then the defaults from vue-storefront/config/default.json file will be used.

Screenshots of visual changes before/after (if there are any)

(if you made any changes in the UI layer please provide before/after screenshots)

Screenshot of passed e2e tests (if you are using our standard setup as a backend)

(run yarn test:e2e and paste the results. If you are not using our standard backend setup or demo.vuestorefront.io you can ommit this step)

Upgrade Notes and Changelog

  • No upgrade steps required (100% backward compatibility)
  • I've updated the Upgrade notes and Changelog on how to port existing VS sites with this new feature

Contribution and currently important rules acceptance

config.magento2.api.consumerSecret = this.answers.m2_api_consumer_secret
config.magento2.api.accessToken = this.answers.m2_api_access_token
config.magento2.api.accessTokenSecret = this.answers.m2_api_access_token_secret
config.magento2.imgUrl = urlParser(this.answers.images_endpoint).href
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldnt be default fallback applied here as well? @Cyclonecode

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pkarw
Nope, not really since the this.answers.images_endpoint is always set in this stage.
If you are not using the default (https://demo.vuestorefront.io) as a backend you will be prompted to choose the images endpoint even if you later decide not to setup credentials or am I missing something:

Choose path for images endpoint (Use arrow keys)
https://demo.vuestorefront.io/img/
http://localhost:8080/img/
Custom url

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it! Thanks

@pkarw pkarw merged commit d35e55f into vuestorefront:develop Nov 29, 2018
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

Successfully merging this pull request may close these issues.

None yet

2 participants