Skip to content

Conversation

@basvanpoppel
Copy link
Contributor

Description (*)

In checkout on the last step, the shipping method is displayed as 'undefined' when no name is set. The code in this PR makes sure the name is only displayed when it's defined.

There is a merged PR related to this, which didn't solve the issue completely (#17697)

Fixed Issues (if relevant)

  1. "- undefined" displayed in checkout summary when shipping method name is not set #17492: "- undefined" displayed in checkout summary when shipping method name is not set

Manual testing scenarios (*)

  1. Add new or edit any existing shipping methods with Method name field left as a blank field.
  2. Add any product to the cart and go through the checkout to the last step.

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 unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds on Travis CI are green)

@m2-assistant
Copy link

m2-assistant bot commented Apr 16, 2019

Hi @basvanpoppel. Thank you for your contribution
Here is some useful tips how you can test your changes using Magento test environment.
Add the comment under your pull request to deploy test or vanilla Magento instance:

  • @magento-engcom-team give me test instance - deploy test instance based on PR changes
  • @magento-engcom-team give me 2.3-develop instance - deploy vanilla Magento instance

For more details, please, review the Magento Contributor Assistant documentation

@magento-cicd2
Copy link
Contributor

magento-cicd2 commented Apr 16, 2019

CLA assistant check
Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


Bas van Poppel seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.

Copy link
Contributor

@orlangur orlangur left a comment

Choose a reason for hiding this comment

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

@basvanpoppel it is not a good idea to duplicate this code, please refactor.

@ghost ghost assigned orlangur Apr 16, 2019
Copy link

@Jensderond Jensderond left a comment

Choose a reason for hiding this comment

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

Using a dot notation for the objects makes the code easier to read.
See: https://eslint.org/docs/2.0.0/rules/dot-notation

@basvanpoppel
Copy link
Contributor Author

@basvanpoppel it is not a good idea to duplicate this code, please refactor.

Thank you for the reply, i will make a new commit later this week. I'm a bit uncertain about 'refactoring, but I have an idea what the best approach should be.
For now I'm using this commit as a patch for current project - as it does fix the issue for all our Magento2 installations.

@orlangur
Copy link
Contributor

@basvanpoppel basically we need one implementation used in two places: place with the old fix and the new one you performed.

@sidolov
Copy link
Contributor

sidolov commented Jun 25, 2019

@basvanpoppel , I am closing this PR now due to inactivity.
Please reopen and update if you wish to continue.
Thank you for the collaboration!

@sidolov sidolov closed this Jun 25, 2019
@m2-assistant
Copy link

m2-assistant bot commented Jun 25, 2019

Hi @basvanpoppel, thank you for your contribution!
Please, complete Contribution Survey, it will take less than a minute.
Your feedback will help us to improve contribution process.

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.

6 participants