Section Rendering API within the Cart Context

Hello,

I’m trying to use the section rendering API to get a section that is in the cart context, like /cart/?sections=notice … The result comes empty and not with the section content. I can’t use the section ID because I want it to be dynamic and I need to call this in the checkout.liquid file to show the information there.

I’ve seen that for other contexts like collections or products this is possible. I wanted to know if you have a workaround to make this work for the cart too.

Thank you!

You can pass parameter to another section using a query string via fetch

Try to fetch the section as follows:


and then call this function.