Skip to content

Default Store is always used when retrieving sequence value's for sales entity's. #9055

@reztierk

Description

@reztierk

The getReservedOrderId function in /vendor/magento/module-quote/Model/ResourceModel/Quote.php and the _beforeSave function in \Magento\Sales\Model\ResourceModel\EntityAbstract are using getStore()->getGroup()->getDefaultStoreId(), when they should be using getStore()->getStoreId(). Causing orders placed on other storeviews to use the prefix/suffix/increment id and sequence tables of the default store.

Preconditions

  1. Magento 2.1.5

Steps to reproduce

  1. Setup a clean install of Magento 2.1.5 with sample data
  2. Add a second store view to the default website
  3. Place an order on the second store view

Expected result

  1. An increment id using the prefix from the new store view, and an entry in the sequence_order_2 table

Actual result

  1. An increment id using the prefix from the default store view, and an entry in the sequence_order_1 table

Metadata

Metadata

Assignees

Labels

Fixed in 2.2.xThe issue has been fixed in 2.2 release lineFixed in 2.3.xThe issue has been fixed in 2.3 release lineIssue: Clear DescriptionGate 2 Passed. Manual verification of the issue description passedIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentReproduced on 2.1.xThe issue has been reproduced on latest 2.1 releaseReproduced on 2.2.xThe issue has been reproduced on latest 2.2 releaseReproduced on 2.3.xThe issue has been reproduced on latest 2.3 release

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions