Template structure & overwriting of templates
Note: This is developer-level documentation. As part of our support policy, we cannot provide support for adjustments unless they have been commissioned through us. If you are not familiar with overwriting templates and resolving potential conflicts, contact us for help.
WooMex templates contain the markup and template structure for the frontend of your shop.
When you open these files, you will notice that they contain all the [Hooks] (/en/products/woomex/developers/woomex-hooks/) that you can use to add or move content without having to edit the template files themselves. This method protects against update issues because the template files can remain completely untouched. Further information can be found in the Documentation for Extension of WooMex.
Templates
Section titled “Templates”You can find all templates in the following folder:
/woomex/templates/Please note that you cannot overwrite all templates, but only the templates that are in the subfolder woocommerce! All other templates are system-relevant and cannot be adjusted by overwriting. However, this should be enough to adjust all sections visible to your customer.
Overwriting templates
Section titled “Overwriting templates”If the available Hooks in the respective template are not enough for adjustment, you can change the template. Instead of adjusting the template directly, you have to overwrite! This prevents your adjustments from being overwritten the next update (yes, updates will exchange all files, whether changed or not).
For this, you need to copy the corresponding template into a folder called woocommerce in your Child Theme, keeping the folder structure! This also applies to possible subfolders. You can ignore the main folder templates.
** Here is an example * * To overwrite the metadata on the product page, you need to copy the following file:
/wp-content/plugins/woomex/templates/woocommerce/single-product/meta.phpzu
/wp-content/themes/yourtheme/woocommerce/single-product/meta.phpThe standard template has now been overwritten and is ignored. You can now safely make all your changes in the copied template.
Warning: Templates may change after updates. If you have overwritten a template that has changed, this can lead to errors! It is therefore important that you check after each update whether a template has changed or not. If changes have occurred, you have to incorporate them into your overwritten template.