Skip to content

Admin store is returned instead of Default store while placing order #16953

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

Closed
tizzyguy87 opened this issue Jul 20, 2018 · 3 comments
Closed
Labels
Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed

Comments

@tizzyguy87
Copy link

tizzyguy87 commented Jul 20, 2018

Preconditions

  1. Upgraded from Magento Open source 2.2.0 to Magenti 2.2.4 and 2.2.5
  2. PHP version 7, My Sql
  3. Magento deployed on Amazon AWS
  4. Use headless commerce approach i.e use Magento rest APIs.

Summary of the issue

After upgrading Magento admin store is returned instead of default store. This is causing inconsistency. Existing customers are not able to login, orders are placed against admin store.

Steps to reproduce

  1. Install Magento 2.2.0
  2. Use default store. No need of multiple stores.
  3. Import Products, create customers.
  4. Create customers from admin console, trigger welcome mail and password reset mails.
  5. Reset password from link given in email. Login using new password. Login works perfectly.
  6. Place couple of orders.
  7. Store is set as default store for customers, orders.
  8. order sequence number is incremented in sequence_order_1
  9. Upgrade Magento to 2.2.5 from Setup Wizard
  10. Fix all the issues during migration.
  11. Try to login with old customers. For new customers try to reset password.
  12. Login not working. Password reset also not working. This is because magento returns store id as 0 instead of 1. So customer is not found for that email in storeid = 0
  13. Did workaround to continue with login. In CustomerRegistry.php, retrieveByEmail method has logic to get websiteid. hard coded this to 1. Hence I am able to continue with login for existing customers.
  14. Continue to add products to cart and place orders.
  15. Order placed successfully with store id=0

Expected result

  1. Customers and order should have store id as 1. As storeid=0 means admin store.

Actual result

  1. Store is set and returned as 0.
@magento-engcom-team
Copy link
Contributor

Hi @tizzyguy87. Thank you for your report.
To help us process this issue please make sure that you provided the following information:

  • Summary of the issue
  • Information on your environment
  • Steps to reproduce
  • Expected and actual results

Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:

@magento-engcom-team give me {$VERSION} instance

where {$VERSION} is version tags (starting from 2.2.0+) or develop branches (2.2-develop +).
For more details, please, review the Magento Contributor Assistant documentation.

@tizzyguy87 do you confirm that you was able to reproduce the issue on vanilla Magento instance following steps to reproduce?

  • yes
  • no

@magento-engcom-team magento-engcom-team added the Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed label Jul 20, 2018
@tizzyguy87 tizzyguy87 changed the title Admin store is returned instead of Default store in all placing order Admin store is returned instead of Default store while placing order Jul 20, 2018
@tizzyguy87
Copy link
Author

@magento-engcom-team give me Magento Open source 2.2.5 instance which is migrated from Magento 2.2.0

@ghost
Copy link

ghost commented Jul 26, 2018

@tizzyguy87, thank you for your report.
We were not able to reproduce this issue by following the steps you provided. If you'd like to update it, please reopen the issue.

@ghost ghost closed this as completed Jul 26, 2018
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed
Projects
None yet
Development

No branches or pull requests

2 participants