Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Redirect from checkout to home with a proper store code - @Fifciu
- Added back error notification when user selects invalid configuration - @1070rik (#4033)
- findConfigurableChildAsync - return best match for configurable variant - @gibkigonzo (#4042)
- use storeCode for mappingFallback url - @gibkigonzo (#4050)

### Changed / Improved
- Optimized `translation.processor` to process only enabled locale CSV files - @pkarw (#3950)
Expand Down
8 changes: 3 additions & 5 deletions core/modules/url/store/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import queryString from 'query-string'
import config from 'config'
import { SearchQuery } from 'storefront-query-builder'
import { preProcessDynamicRoutes, normalizeUrlPath, parametrizeRouteData, getFallbackRouteData } from '../helpers'
import { removeStoreCodeFromRoute, currentStoreView, localizedDispatcherRouteName } from '@vue-storefront/core/lib/multistore'
import { removeStoreCodeFromRoute, currentStoreView, localizedDispatcherRouteName, adjustMultistoreApiUrl } from '@vue-storefront/core/lib/multistore'
import storeCodeFromRoute from '@vue-storefront/core/lib/storeCodeFromRoute'
import fetch from 'isomorphic-fetch'
import { Logger } from '@vue-storefront/core/lib/logger'
Expand Down Expand Up @@ -135,8 +135,7 @@ export const actions: ActionTree<UrlState, any> = {
*/
async getFallbackByUrl (context, { url }) {
try {
const { elasticsearch } = currentStoreView()
const requestUrl = `${processURLAddress(config.urlModule.map_endpoint)}/${elasticsearch.index}`
const requestUrl = `${adjustMultistoreApiUrl(processURLAddress(config.urlModule.map_endpoint))}`
let response: any = await fetch(
requestUrl,
{
Expand Down Expand Up @@ -190,8 +189,7 @@ export const actions: ActionTree<UrlState, any> = {
async saveFallbackData ({ commit }, { _type, _source }) {
switch (_type) {
case 'product': {
configureChildren(_source)
storeProductToCache(_source, 'sku')
// TODO: find a way to cache simple, configurable, group, bundle or custom_options products
break
}
case 'category': {
Expand Down