File tree Expand file tree Collapse file tree
app/code/Magento/Catalog/Model/ResourceModel/Product/Option Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -160,19 +160,22 @@ protected function _saveValuePrices(AbstractModel $object)
160160 && isset ($ objectPrice )
161161 && $ object ->getStoreId () != Store::DEFAULT_STORE_ID
162162 ) {
163- $ baseCurrency = $ this ->_config ->getValue (
163+ $ website = $ this ->_storeManager ->getStore ($ object ->getStoreId ())->getWebsite ();
164+
165+ $ websiteBaseCurrency = $ this ->_config ->getValue (
164166 Currency::XML_PATH_CURRENCY_BASE ,
165- 'default '
167+ ScopeInterface::SCOPE_WEBSITE ,
168+ $ website
166169 );
167170
168- $ storeIds = $ this -> _storeManager -> getStore ( $ object -> getStoreId ())-> getWebsite () ->getStoreIds ();
171+ $ storeIds = $ website ->getStoreIds ();
169172 if (is_array ($ storeIds )) {
170173 foreach ($ storeIds as $ storeId ) {
171174 if ($ priceType == 'fixed ' ) {
172175 $ storeCurrency = $ this ->_storeManager ->getStore ($ storeId )->getBaseCurrencyCode ();
173176 /** @var $currencyModel Currency */
174177 $ currencyModel = $ this ->_currencyFactory ->create ();
175- $ currencyModel ->load ($ baseCurrency );
178+ $ currencyModel ->load ($ websiteBaseCurrency );
176179 $ rate = $ currencyModel ->getRate ($ storeCurrency );
177180 if (!$ rate ) {
178181 $ rate = 1 ;
You can’t perform that action at this time.
0 commit comments