Can I place my template (theme) files in a different directory?

By default Commerce looks inside core/components/commerce/templates/ for your theme files. If you'd like to have it also look in a different theme directory, such as /core/components/my-commerce-theme/ you can specify the commerce.theme_path system setting with the absolute path to your template directory.

When setting a theme path, you still need to create a folder inside that directory that matches your theme name as configured in commerce.theme.

We recommend using a core path and ensuring your core directory is locked down to avoid direct access to the twig files.

Still need help? Send us an email Send us an email