Is there a way to call shopware 6 layout on checkout pages? #381
-
So I have a requirement where the Cart, Checkout process, and Success pages have some CMS blocks in design. However, I haven't found a way to assign a layout from the Shopware 6 admin to these pages. Is it possible to achieve this? if yes! i will highly appreciate guidance in this matter. 🙏 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi, @junaidfar00qui, and thx for this question. It is true that you can not assign a layout to these pages (Cart/Checkout). But you can always load any CMS page via More complex way: I hope this reply helps you. 🤝 |
Beta Was this translation helpful? Give feedback.
Hi, @junaidfar00qui, and thx for this question.
It is true that you can not assign a layout to these pages (Cart/Checkout). But you can always load any CMS page via
store API
. You must create the page via Admin first and after that use the hard-coded UUID inside the Request. After that, you can use the data from JSON to create whatever you need or pass the data to existing components. The main issue here is that the UUID can be different depending on instances and it feels haky to have hardcoded UUID.More complex way:
You can search for the CMS page with some
admin API
request, likePOST /api/search/cms-page
for example. To do this you could use the new API client (see section about Admi…