24if (!defined(
"NOLOGIN")) {
 
   25  define(
"NOLOGIN", 
'1'); 
 
   27if (!defined(
'NOIPCHECK')) {
 
   28  define(
'NOIPCHECK', 
'1'); 
 
   30if (!defined(
'NOBROWSERNOTIF')) {
 
   31  define(
'NOBROWSERNOTIF', 
'1');
 
   35require 
'../../main.inc.php';
 
   37require_once DOL_DOCUMENT_ROOT.
'/categories/class/categorie.class.php';
 
   39if (!$conf->global->TAKEPOS_QR_MENU) {
 
   46  <meta charset=
"UTF-8">
 
   47  <title><?php echo $mysoc->name; ?></title>
 
   48  <link rel=
'stylesheet' href=
'https://cdn.jsdelivr.net/npm/foundation-sites@6.6.3/dist/css/foundation.min.css'>
 
   49<link rel=
'stylesheet' href=
'https://fonts.googleapis.com/css?family=Khand:400,300,500,600,700'><link rel=
"stylesheet" href=
"css/style.css">
 
   50<meta 
name=
"viewport" content=
"width=device-width, initial-scale=1">
 
   53<!-- partial:index.partial.html -->
 
   55  <div 
class=
"grid-container">
 
   56    <div 
class=
"grid-x grid-padding-x menu2">
 
   57    <div 
class=
"cell small-12">
 
   58      <h1><?php print $mysoc->name; ?> - <small><?php print $langs->trans(
'RestaurantMenu'); ?></small></h1>
 
   62$categories = $categorie->get_full_arbo(
'product', (($conf->global->TAKEPOS_ROOT_CATEGORY_ID > 0) ? $conf->global->TAKEPOS_ROOT_CATEGORY_ID : 0), 1);
 
   63$levelofrootcategory = 0;
 
   64if ($conf->global->TAKEPOS_ROOT_CATEGORY_ID > 0) {
 
   65  foreach ($categories as $key => $categorycursor) {
 
   66    if ($categorycursor[
'id'] == $conf->global->TAKEPOS_ROOT_CATEGORY_ID) {
 
   67      $levelofrootcategory = $categorycursor[
'level'];
 
   72$levelofmaincategories = $levelofrootcategory + 1;
 
   74$maincategories = array();
 
   75$subcategories = array();
 
   76foreach ($categories as $key => $categorycursor) {
 
   77  if ($categorycursor[
'level'] == $levelofmaincategories) {
 
   78    $maincategories[$key] = $categorycursor;
 
   80    $subcategories[$key] = $categorycursor;
 
   86foreach ($maincategories as $cat) {
 
   87  print 
'<div class="text-center"> 
   88            <a id="'.$cat[
'id'].
'"></a><h3>'.$cat[
'label'].
'</h3> 
   90      <div class="grid-x grid-padding-x">';
 
   93  $result = $object->fetch($cat[
'id']);
 
   94  $prods = $object->getObjectsInCateg(
"product", 0, 0, 0, $conf->global->TAKEPOS_SORTPRODUCTFIELD, 
'ASC');
 
   95  foreach ($prods as $pro) {
 
   97    <div class="cell small-6 medium-4"> 
   99                <h4>'.$pro->label.
'</h4> 
  100                <span class="dots"></span> 
  101                <span class="price">'.
price($pro->price_ttc, 1, $langs, 1, -1, -1, $conf->currency).
'</span> 
  111  <footer 
class=
"footer">
 
  112    <div 
class=
"container">
 
  113    <p 
class=
"text-muted"><?php print $mysoc->name; ?></p>
 
  118  <script src=
'https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js'></script>
 
  119<script src=
'https://cdn.jsdelivr.net/npm/foundation-sites@6.6.3/dist/js/foundation.min.js'></script><script  src=
"js/script.js"></script>
 
Class to manage categories.
 
price($amount, $form=0, $outlangs='', $trunc=1, $rounding=-1, $forcerounding=-1, $currency_code='')
Function to format a value into an amount for visual output Function used into PDF and HTML pages.
 
dol_sort_array(&$array, $index, $order='asc', $natsort=0, $case_sensitive=0, $keepindex=0)
Advanced sort array by second index function, which produces ascending (default) or descending output...
 
$conf db name
Only used if Module[ID]Name translation string is not found.
 
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.