Skip to content

Commit

Permalink
feat: display product titles without suffix (#767)
Browse files Browse the repository at this point in the history
* feat: display product titles without suffix

* chore: change shop-api version

* chore: lock file for shop-api version

* chore: fix yarn lock
  • Loading branch information
doproiescu-plenty authored Nov 1, 2024
1 parent 390294f commit e28d32a
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 8 deletions.
6 changes: 5 additions & 1 deletion apps/web/composables/useProduct/useProduct.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,14 @@ export const useProduct: UseProductReturn = (slug) => {
* @description Function for setting product title meta data
*/
const setProductMeta = () => {
const title = productGetters.getName(state.value.data);
const { titleSuffix } = useAppConfig();

const title =
productGetters.getTitle(state.value.data) || `${productGetters.getName(state.value.data)} | ${titleSuffix}`;

useHead({
title,
titleTemplate: '',
meta: [
{
name: 'description',
Expand Down
1 change: 0 additions & 1 deletion apps/web/layouts/default.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
<script setup lang="ts">
import type { DefaultLayoutProps } from '~/layouts/types';
defineProps<DefaultLayoutProps>();
usePageTitle();
const { setLogoMeta } = useStructuredData();
const { isOpen, product } = useQuickCheckout();
const viewport = useViewport();
Expand Down
1 change: 1 addition & 0 deletions docs/changelog/changelog_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
- Implement new notification design
- Adding the ability to have alt text for images.
- It's now possible to change the font color of the hero banner via a template property.
- Display product titles without global suffix when available, maintaining backward compatibility.

### 🩹 Fixed

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"lhci:mobile": "lhci autorun"
},
"dependencies": {
"@plentymarkets/shop-api": "^0.70.0",
"@plentymarkets/shop-api": "^0.71.0",
"@types/applepayjs": "^14.0.8",
"@vee-validate/nuxt": "^4.13.2",
"@vee-validate/yup": "^4.13.2",
Expand Down
10 changes: 5 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4237,7 +4237,7 @@ __metadata:
"@nuxt/test-utils": ^3.13.1
"@nuxtjs/turnstile": ^0.8.0
"@paypal/paypal-js": 8.1.0
"@plentymarkets/shop-api": ^0.70.0
"@plentymarkets/shop-api": ^0.71.0
"@types/applepayjs": ^14.0.8
"@types/uuid": ^9.0.8
"@vee-validate/nuxt": ^4.13.2
Expand Down Expand Up @@ -4270,14 +4270,14 @@ __metadata:
languageName: unknown
linkType: soft

"@plentymarkets/shop-api@npm:^0.70.0":
version: 0.70.0
resolution: "@plentymarkets/shop-api@npm:0.70.0::__archiveUrl=https%3A%2F%2Fnpm.pkg.github.com%2Fdownload%2F%40plentymarkets%2Fshop-api%2F0.70.0%2F2f278cfc772ef9d0af21e270e2c68bc0e0edb6c0"
"@plentymarkets/shop-api@npm:^0.71.0":
version: 0.71.0
resolution: "@plentymarkets/shop-api@npm:0.71.0::__archiveUrl=https%3A%2F%2Fnpm.pkg.github.com%2Fdownload%2F%40plentymarkets%2Fshop-api%2F0.71.0%2Fb198146dc9c37aaa2d7f5c98b6f106dfc352b2a0"
dependencies:
"@vue-storefront/middleware": ^3.10.0
axios: ^1.7.7
consola: ^3.2.3
checksum: 54a045a55a17183a4addf2ebc6a7e668947bcd205c5500826ec478da0ed23e740c64df991923c716cc5c14d13252f3e1696936b262c187a48319e8246936f8cd
checksum: 529ffa11e2143d7ef9d0a2a301f6a2f2974f7bbb440384a3b1e511f77432830740bdc836994327d5382b6c5b1efe39dbb18e1f21a8d0a7bdcebddc6de505ec35
languageName: node
linkType: hard

Expand Down

0 comments on commit e28d32a

Please sign in to comment.