WooCommerce Restaurant Ordering uses a similar PHP templating mechanism to that used in WooCommerce. A number of templates are used by the plugin to display the various HTML components that comprise the restaurant order forms.
All templates are included in the
/templates folder within the plugin. On your web server this location would be:
/templates folder you will find subfolders for the following:
cart-notice- Controls the display of the cart notice shown at the top of the page after adding a product to the cart.
menu- Controls the display of the restaurant menu order form.
modal- Controls the display of the product lightbox (modal).
Within each of these folders are various PHP templates, some contained in further subfolders.
Overriding a template
To override a template, you need to copy the required template to your theme folder and place it in the folder
/woocommerce/restaurant/within your theme folder.
For example, if you wanted to override the
name.php template contained under the
/menu/product template folder, you would copy
name.php to your theme at this location:
if you wanted to override the
content.php template contained under the
/modal template folder, you would copy
content.php from the plugin to your theme at this location:
The templates used for the
modal are Underscores templates and are loaded using the wp.template function.