Skip to content

Commit

Permalink
Merge pull request #2158 from qiqqq/feature/2074-category-and-product…
Browse files Browse the repository at this point in the history
…-meta-fields

Issue 2074: Using meta_title and meta_description fields on product a…
  • Loading branch information
pkarw authored Jan 11, 2019
2 parents 03b3d98 + 1069f33 commit b329bb8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions core/pages/Category.js
Original file line number Diff line number Diff line change
Expand Up @@ -274,8 +274,8 @@ export default {
}, storeView.storeCode)).href
}
],
title: htmlDecode(this.$route.meta.title || this.categoryName),
meta: this.$route.meta.description ? [{ vmid: 'description', description: htmlDecode(this.$route.meta.description) }] : []
title: htmlDecode(this.category.meta_title || this.categoryName),
meta: this.category.meta_description ? [{ vmid: 'description', description: htmlDecode(this.category.meta_description) }] : []
}
}
}
6 changes: 3 additions & 3 deletions core/pages/Product.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { mapGetters } from 'vuex'

import store from '@vue-storefront/store'
import EventBus from '@vue-storefront/core/compatibility/plugins/event-bus'
import { htmlDecode, stripHTML } from '@vue-storefront/core/filters'
import { htmlDecode } from '@vue-storefront/core/filters'
import { currentStoreView, localizedRoute } from '@vue-storefront/store/lib/multistore'
import { CompareProduct } from '@vue-storefront/core/modules/compare/components/Product.ts'
import { AddToCompare } from '@vue-storefront/core/modules/compare/components/AddToCompare.ts'
Expand Down Expand Up @@ -225,7 +225,6 @@ export default {
metaInfo () {
const storeView = currentStoreView()
return {
title: htmlDecode(this.$route.meta.title || this.productName),
link: [
{ rel: 'amphtml',
href: this.$router.resolve(localizedRoute({
Expand All @@ -238,7 +237,8 @@ export default {
}, storeView.storeCode)).href
}
],
meta: [{ vmid: 'description', description: this.product.short_description ? stripHTML(htmlDecode(this.product.short_description)) : htmlDecode(stripHTML(this.product.description)) }]
title: htmlDecode(this.product.meta_title || this.productName),
meta: this.product.meta_description ? [{ vmid: 'description', description: htmlDecode(this.product.meta_description) }] : []
}
}
}

0 comments on commit b329bb8

Please sign in to comment.