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

Fix checking active carrier against store #7344

Merged
merged 1 commit into from
Mar 31, 2017

Conversation

torreytsui
Copy link
Contributor

@torreytsui torreytsui commented Nov 7, 2016

Issue

Scope specifically enabled carrier does not work

screen shot 2016-11-07 at 15 46 24

Bug Reproduction

Prerequisite

There are two websites.

Flatrate is disabled in default scope and the first website, and enabled in the second website.

NOTE: We need two websites in this test case to make sure the MAGE_RUN_CODE will only be set against the first website when visiting Admin Panel

Steps

  1. Go to Admin > Order > New Order > New Customer > select a store in the second website.
  2. Add a product to basket
  3. Fill in the addresses
  4. Chose any payment method
  5. Click Get shipping methods and rates

Expected Result

Flatrate shows up as avaliable shipping method

Actual Result

Flatrate does not show up

Cause of issue

\Magento\Shipping\Model\CarrierFactory::createIfActive only check if a carrier is active against a scope resolved by scope-resolver which takes the MAGE_RUN_CODE to resolve. If a carrier is disabled by default and by the the website of MAGE_RUN_CODE and only enabled for specific websites, the method will return false which is wrong

@vrann vrann self-assigned this Mar 24, 2017
@vrann vrann added this to the March 2017 milestone Mar 24, 2017
@magento-team magento-team merged commit 08b5177 into magento:develop Mar 31, 2017
@okorshenko
Copy link
Contributor

@torreytsui thank you for your contribution!

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.

5 participants