vtex / faststore

Digital commerce toolkit for frontend developers
https://faststore.dev
MIT License
189 stars 60 forks source link

Feat: PDP Multiple page templates - sku id rules #2321

Closed eduardoformiga closed 4 months ago

eduardoformiga commented 5 months ago

What's the purpose of this pull request?

This PR aims to adjust the Multiple page feature to always take into consideration the PDP template in the following order:

  1. PDP slug with skuId.
  2. PDP slug without skuId.
  3. PDP Category tree.

It also adds some tests.

How to test it?

You should create PDPs templates in the hCMS with and without SKUs.

  1. when the slug has an SKU, the template with the SKU should be rendered.
  2. when the slug has no SKU, the template without an SKU should be rendered.

References

Documentation improvements:

https://developers.vtex.com/docs/guides/faststore/headless-cms-multiple-page-template https://vtex-dev.atlassian.net/browse/SFS-892

vercel[bot] commented 5 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment | Name | Status | Preview | Comments | Updated (UTC) | | :--- | :----- | :------ | :------- | :------ | | **faststore-site** | ⬜️ Ignored ([Inspect](https://vercel.com/faststore/faststore-site/DRrf71uRc99RKRNJV9Yq4CP18jDp)) | [Visit Preview](https://faststore-site-git-feat-multiple-template-pdp-a50478-faststore.vercel.app) | | May 24, 2024 2:39pm |
codesandbox-ci[bot] commented 4 months ago

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.