PHP Restaurant MarketplaceUser Manual Visit PHP Restaurant Marketplace →
Reference

Customization and folder structure

The script is written in plain PHP without a framework, so a developer - or an advanced site owner - can change almost anything in a few minutes.

Folder structure

Folder / fileWhat it is
index.phpFront controller of the website. It loads the page controller, the page model and the template engine.
config.phpDomain and database access.
include/Shared classes (database, page controller, template engine), the restaurant, basket and payment classes, helper functions, AI and AJAX endpoints.
extensions/The pages of the website. ?mod=search loads extensions/search.php. Files ending in _tag.php are the tags used by the template.
templates/modern/The theme: template.html, assets/css/style.css and assets/js/app.js.
languages/Text files, one per language.
locations/Countries, regions and cities as a text file.
ADMIN/Main admin panel. The menu is pages_structure.php; each page is ADMIN/category/page.php.
user_admin/Restaurant owner panel with the same page-per-file structure.
uploaded_images/, thumbnails/Photos uploaded by restaurants (must be writable).
webhook_stripe.phpReceives Stripe payment confirmations.

Change the look

  • Logo and colors - Website → Logo and favicon, no code needed.
  • Layout and design - edit templates/modern/template.html. The page content is inserted where <site content/> is; other tags such as <site menu/>, <site logo/> and <site languages_menu/> output the menu, logo and language switcher.
  • Styling - all CSS is in assets/css/style.css with CSS variables at the top; the code uses classes instead of inline styles, so changes are easy.

Change a text

Use Website → Interface texts, or edit languages/en.php. In templates a text is written as {{ key }} and in PHP as __('key').

Add a page that runs your own PHP

  1. Create extensions/mypage.php with your code (look at extensions/contact.php for a small example).
  2. In Website → Pages add a page and enter mypage as its extension file.

Combine with another script

The core classes, the ADMIN panel and the owner panel follow the same conventions as other scripts of the same family, so you can run several products on one site and copy menu entries and module files between them.

Make a backup (Settings → Backups and a copy of the files) before you change code.

Last updated