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
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
<div class="container">
<breadcrumbs
:with-homepage="true"
:routes="[{name: 'Homepage', route_link: '/'}]"
:active-route="this.$t('Order confirmation')"
/>
<h2 class="category-title">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,13 +112,17 @@ export default {
return productList
},
categories () {
const categoriesMap = {}
this.products.forEach(product => {
[...product.category].forEach(category => {
categoriesMap[category.category_id] = category
})
})
return Object.keys(categoriesMap).map(categoryId => categoriesMap[categoryId])
const categories = this.products
.filter(p => p.category)
.map(p => p.category)
.flat()
.filter(c => c.name)

const discinctCategories = Array.from(
new Set(categories.map(c => c.category_id))
).map(catId => categories.find(c => c.category_id === catId))

return discinctCategories
},
getNoResultsMessage () {
let msg = ''
Expand Down
2 changes: 1 addition & 1 deletion src/themes/default/pages/Compare.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div class="compare">
<div class="bg-cl-secondary py35 pl20">
<div class="container">
<breadcrumbs :with-homepage="true" :routes="[{name: 'Homepage', route_link: '/'}]" active-route="Compare" />
<breadcrumbs :with-homepage="true" active-route="Compare" />
<h2>{{ title }}</h2>
</div>
</div>
Expand Down