From c308795d3c520d1785d8db88461692283cbe8eee Mon Sep 17 00:00:00 2001 From: Sanjay Patel Date: Sat, 19 May 2018 11:23:56 +0530 Subject: [PATCH 1/4] #14063 - Wrong invoice prefix in multistore setup due to default store id --- .../Magento/Sales/Model/ResourceModel/EntityAbstract.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/Sales/Model/ResourceModel/EntityAbstract.php b/app/code/Magento/Sales/Model/ResourceModel/EntityAbstract.php index 8a8ee5e9c799f..2152ff7c84556 100644 --- a/app/code/Magento/Sales/Model/ResourceModel/EntityAbstract.php +++ b/app/code/Magento/Sales/Model/ResourceModel/EntityAbstract.php @@ -121,10 +121,15 @@ protected function _beforeSave(\Magento\Framework\Model\AbstractModel $object) { /** @var \Magento\Sales\Model\AbstractModel $object */ if ($object instanceof EntityInterface && $object->getIncrementId() == null) { + $store = $object->getStore(); + $storeId = $store->getId(); + if ($storeId === null) { + $storeId = $store->getGroup()->getDefaultStoreId(); + } $object->setIncrementId( $this->sequenceManager->getSequence( $object->getEntityType(), - $object->getStore()->getGroup()->getDefaultStoreId() + $storeId )->getNextValue() ); } From b04093c17be2979d2148d72d3e056710954f958c Mon Sep 17 00:00:00 2001 From: Elias Kotlyar Date: Tue, 29 May 2018 12:19:46 +0200 Subject: [PATCH 2/4] Fixxes #15565 --- app/code/Magento/Store/Model/PathConfig.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/Store/Model/PathConfig.php b/app/code/Magento/Store/Model/PathConfig.php index 0d80d98c32821..aacc59d973767 100644 --- a/app/code/Magento/Store/Model/PathConfig.php +++ b/app/code/Magento/Store/Model/PathConfig.php @@ -76,6 +76,8 @@ public function shouldBeSecure($path) */ public function getDefaultPath() { - return $this->scopeConfig->getValue('web/default/front', ScopeInterface::SCOPE_STORE); + $store = $this->storeManager->getStore(); + $value =$this->scopeConfig->getValue('web/default/front', ScopeInterface::SCOPE_STORE,$store); + return $value; } } From 486c5d4e65d56ece58f0ed28ec064b9fbae214d8 Mon Sep 17 00:00:00 2001 From: Vishal Gelani Date: Tue, 29 May 2018 19:02:13 +0530 Subject: [PATCH 3/4] Fixed coding standard error --- app/code/Magento/Store/Model/PathConfig.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Store/Model/PathConfig.php b/app/code/Magento/Store/Model/PathConfig.php index aacc59d973767..f55388bb4695e 100644 --- a/app/code/Magento/Store/Model/PathConfig.php +++ b/app/code/Magento/Store/Model/PathConfig.php @@ -77,7 +77,7 @@ public function shouldBeSecure($path) public function getDefaultPath() { $store = $this->storeManager->getStore(); - $value =$this->scopeConfig->getValue('web/default/front', ScopeInterface::SCOPE_STORE,$store); + $value = $this->scopeConfig->getValue('web/default/front', ScopeInterface::SCOPE_STORE, $store); return $value; } } From f17836f0597976bcc48cd123349bd9ac77531316 Mon Sep 17 00:00:00 2001 From: vgelani Date: Thu, 14 Jun 2018 22:26:16 +0530 Subject: [PATCH 4/4] Removed commented line --- .../Sales/Block/Adminhtml/Order/Create/Totals/Discount.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Totals/Discount.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Totals/Discount.php index cdeb596a54ac7..b28dbda5f3810 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Totals/Discount.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Totals/Discount.php @@ -15,8 +15,6 @@ */ class Discount extends \Magento\Sales\Block\Adminhtml\Order\Create\Totals\DefaultTotals { - //protected $_template = 'tax/checkout/subtotal.phtml'; - /** * Tax config *