Stumped by WooCommerce templates

I’ve read posts on this forum and tried various approaches but am still having issues customising the WooCommerce layouts using Bricks, particularly the checkout one.

I have the checkout page and it’s set as the page to use in WooCommerce, then I’ve created a Bricks template of type “WooCommerce checkout” and I’ve added the [woocommerce_checkout] shortcode to this page however in so doing this displays a “not allowed: infinite template loop” message in the editor.

The checkout displays okay on the frontend but when I added custom layouts the checkout stopped working - do I need to leave the default shortcode in place and add my custom elements too, or do I need to remove the shortcode entirely?

The way it works right now is the page requires the WooCommerce shortcode.

1 Like

Make sure you add the shortcode to the page and not the template. It sounds like you might have added it to the template by mistake.

After you fix that you can add whatever page content you want to the template in Bricks and it will show up in the front end.

Ah okay so the principal is you still have the PAGES for cart/checkout/account which WC creates by default but on those pages you should just have the default shortcode.

We then create a Bricks template of those specific types, no need for any special template conditions as they are automatically assigned, then we add whatever content we want into those templates rather than the pages?

1 Like

Absolutely, yes! That is the workflow.

Okay great, thanks for confirming, i was just getting confused about adding content to the page as opposed to adding it to the template and sometimes the template not being applied and the checkout page not working but I’m sure that’ll be because I interfered with the default shortcode by adding content to the page instead.

1 Like

Correct. There was a time the WooCommerce shortcode wasn’t needed. But that changed in 2024 I believe.