Skip to content

Commit

Permalink
Feat: Multiple page template PDP - CMS Structure (#2225)
Browse files Browse the repository at this point in the history
## What's the purpose of this pull request?

- [x] Removes singleton.
- [x] Adds PDP template content type structure.  

## How it works?

Use the `vendemo` account, and now you will be able to see this template
structure under the settings tab of hCMS.
<img width="1554" alt="Screenshot 2024-02-06 at 17 27 24"
src="https://github.com/vtex/faststore/assets/11325562/3bab00e1-09d1-4f07-ba47-c3c6539423ce">
<img width="1055" alt="Screenshot 2024-02-06 at 16 16 35"
src="https://github.com/vtex/faststore/assets/11325562/79523c3a-eae4-428e-a4cb-971253b77663">
the way we are going to deal with this content in frontend will be
addressed in another task and the details are under the Multiple
template page RFC.

See the response from hCMS API.
https://vendemo.myvtex.com/admin/new-cms/faststore/pdp

the other task will also cover the documentation.

### References

Doc PR
- #2236
[RFC Multiple page template
details](https://docs.google.com/document/d/1qQ573B9iVadSrqjvjSt8ExDu7-uxa3_COXlKvqkTQ8Q)

---------

Co-authored-by: Gabriel Antiqueira <[email protected]>
  • Loading branch information
eduardoformiga and Gabriel Antiqueira authored Feb 29, 2024
1 parent 2cf5776 commit c2fd0b5
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 8 deletions.
23 changes: 21 additions & 2 deletions packages/core/cms/faststore/content-types.json
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,27 @@
"id": "pdp",
"name": "Product Page",
"scopes": ["pdp"],
"isSingleton": true,
"configurationSchemaSets": []
"configurationSchemaSets": [
{
"name": "Settings",
"configurations": [
{
"name": "template",
"schema": {
"title": "Template",
"type": "object",
"properties": {
"value": {
"title": "PDP template value (e.g. Slug: /apple-magic-mouse/p OR /department/category/subcategory/)",
"type": "string",
"description": "Possible values: the PDP slug template (e.g. '/apple-magic-mouse/p'); A PLP template (e.g. '/department/' OR '/department/category/' OR '/department/category/subcategory/'). If empty, this template will be the generic PDP."
}
}
}
}
]
}
]
},
{
"id": "plp",
Expand Down
8 changes: 2 additions & 6 deletions packages/core/cypress/integration/seo.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,9 +176,7 @@ describe('Collection Page Seo', () => {
cy.get('link[rel="canonical"]')
.should('exist')
.should(($link) => {
expect($link.attr('href')).to.eq(
`${storeUrl}${pages.collection}`
)
expect($link.attr('href')).to.eq(`${storeUrl}${pages.collection}`)
})
})

Expand Down Expand Up @@ -233,9 +231,7 @@ describe('Filtered Collection Page Seo', () => {
cy.get('link[rel="canonical"]')
.should('exist')
.should(($link) => {
expect($link.attr('href')).to.eq(
`${storeUrl}${pages.collection}`
)
expect($link.attr('href')).to.eq(`${storeUrl}${pages.collection}`)
})
})

Expand Down

0 comments on commit c2fd0b5

Please sign in to comment.