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

Website Specific Shipping Methods are not working after upgrade 2.1.2=>2.1.3 #7840

Closed
netzweltvimal opened this issue Dec 16, 2016 · 26 comments
Labels
bug report Component: Shipping Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development

Comments

@netzweltvimal
Copy link

netzweltvimal commented Dec 16, 2016

Preconditions

  1. 2.1.3

Steps to reproduce

  1. Set Different Shipping Methods for Multi Website

Expected result

  1. Shipping Method should be appear according to website

Actual result

  1. Not showing according to Website Shipping Method which is set in Admin=> Shipping Methods
  2. Some time fetal error "Shipping Address Not Set" on Cart and Checkout page
  3. Default Config Shipping Methods are showing , not Website Specific.
@nitinwaves
Copy link

Looks like Website Level Configurations are not working at all..

We noticed this problem during base url setup as well.. we had setup base url at store level of each website.

But in case of shipping method, there is no option to enable /disable shipping method at store level. we can only set it at website level. So when we set the shipping methods at website level, it doesn't work.. it is always picking the shipping methods from default config.

Conclusion: Website Level Configurations are not working and it falls back to default config UNLESS there is any override at store level.

@alexpoletaev
Copy link

Website Level Configurations are not working and it falls back to default config UNLESS there is any override at store level.

Confirm.

@alexnos88
Copy link

Same for me

@abi2
Copy link

abi2 commented Dec 16, 2016

Guess this is the underlying problem of my issue
#7830

@mtuinstra
Copy link

Try removing your configuration in the core_config_data table and then set is again via magento, this did the trick for us with themes: #7841

@alexpoletaev
Copy link

The problem is here Magento\Store\Model\Config\Processor\Fallback::getWebsiteConfig().
This line $code = $website['website_id']; should be replaced with $code = $website['code'];
As a workaround you can create your own module and extend the Fallback class using di.xml, but since almost all methods and properties has a 'private' scope, you will need to override them all.

@abi2
Copy link

abi2 commented Dec 20, 2016

@alexpoletaev can you be more specific,
This is what I have changed so far:
private function getWebsiteConfig(array $websites, $id) { foreach ($this->websiteData as $website) { if ($website['website_id'] == $id) { $code = $website['code']; return isset($websites[$code]) ? $websites[$code] : []; } } return []; }

Thanks

@alexpoletaev
Copy link

@abi2, you did the right thing.

@abi2
Copy link

abi2 commented Dec 20, 2016

@alexpoletaev still not working for me, any need to recompile?

Thanks

@salelsol
Copy link

@alexpoletaev where is this file ?

@alexpoletaev
Copy link

@salelsol vendor/magento/module-store/Model/Config/Processor/Fallback.php

@salelsol
Copy link

@alexpoletaev afther change file this modification works fine in all 3 multiwebsite frontend, but I can´t access to backend: Requested store is not found.

@salelsol
Copy link

@alexpoletaev maybe I would be modify index.php:
index.php{main}";s:3:"url";s:7:"/admin/";s:11:"script_name";s:10:"/index.php";}

createApplication('Magento\Framework\App\Http'); * $bootstrap->run($app); * -------------------------------------------- * * Copyright © 2016 Magento. All rights reserved. * See COPYING.txt for license details. */ try { require __DIR__ . '/app/bootstrap.php'; } catch (\Exception $e) { echo <<

Autoload error

{$e->getMessage()}

HTML; exit(1); } $bootstrap = \Magento\Framework\App\Bootstrap::create(BP, $_SERVER); /** @var \Magento\Framework\App\Http $app */ $app = $bootstrap->createApplication('Magento\Framework\App\Http'); $bootstrap->run($app);

@salelsol
Copy link

@alexpoletaev backend works also. Many thaks for your help.

@veloraven
Copy link
Contributor

Internal ticket MAGETWO-62758 was created

@veloraven veloraven added the Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development label Dec 28, 2016
@MagePsycho
Copy link
Contributor

Fix provided by @alexpoletaev is not working for General > Allowed Country settings. So Magento Team should provide the solution ASAP as this is very sensitive issue for any store.
Thanks

@hostep
Copy link
Contributor

hostep commented Dec 30, 2016

I agree with @MagePsycho that this bug needs to be fixed ASAP. It's the only new bug in 2.1.3 that actually prevents us from upgrading our shops to 2.1.3 since it has the potential of causing all kinds of unexpected issues.

@MagePsycho: For me the Allowed Country setting works when I apply the fix from @alexpoletaev btw (maybe you forgot to flush your caches?).

@veloraven: this exact same bug is also being tracked over here and got a different MAGETWO number assigned, just so you know if you didn't know already: #7943
And the issue was introduced in this commit: c1e806f#diff-5dec7e10285c9a96cf5b40b06ece36c0L107

@veloraven: I really would like to see this bug getting a very high priority, and being fixed in a new release in the first week of January if possible (for my part you can create a version '2.1.3.1' which only contains a fix for this bug).

And thanks to @alexpoletaev for discovering the fix!

@wsagen
Copy link

wsagen commented Jan 3, 2017

Also affecting our clients - needs fixing ASAP

@JonasBlicherJensen
Copy link

Extremely critical bug.
How did this get released? It must be one of the most fundamental functionalities in Magento 2.

@ebaschiera
Copy link

ebaschiera commented Jan 16, 2017

Apparently the fix suggested in this issue is breaking the payment selection step in checkout. It appears as blank, and the corrisponding <div> stays hidden.
I am on Magento EE 2.1.3.

@ebaschiera
Copy link

Sorry, my problem was on a 3rd party module, not magento core.

@erikhansen
Copy link
Contributor

erikhansen commented Jan 23, 2017

Do be aware that if this is a critical issue for you on 2.1.3, you can fix this issue by patching your installation by making the change I outlined here: #7943 (comment)

If you're installing Magento via Composer, you should check out this elegant composer-patches plugin that @hostep alerted me of that allows you to apply patches when composer install is run.

@ghost
Copy link

ghost commented Jan 23, 2017

Rather concerning that something so elementary made it past their testers, if they use any.

@salelsol
Copy link

salelsol commented Feb 8, 2017

@alexpoletaev , afther upgrading to M2.1.4 vendor/magento/module-store/Model/Config/Processor/Fallback.php has changed and $code = $website['code']; it´s O.K. , but I can´t access to subdomains like before in M2.1.3.

@salelsol
Copy link

salelsol commented Feb 8, 2017

@alexpoletaev , Sorry issue is due because .htaccess was changed, now works fine.

@veloraven veloraven removed their assignment Feb 22, 2017
@KrystynaKabannyk
Copy link

Hi @netzweltvimal, this issue was fixed under MAGETWO-62648 in 2.1.4, that's why I closed it. If you have additional questions or info please feel free to reopen this one or create a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug report Component: Shipping Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development
Projects
None yet
Development

No branches or pull requests