Beispiel #1
0
 $actif = $i == 0 ? "active" : "";
 // ---- Recherche des sous-catégories ----- //
 unset($recherche);
 $recherche["id_parent"] = $_categorie["id"];
 $liste_sous_categorie = $categorie->getListe($recherche, $debug);
 // ---------------------------------------- //
 echo "<div class='content " . $actif . "' id='panel" . $_categorie["id"] . "'>\n";
 if (!empty($liste_sous_categorie)) {
     foreach ($liste_sous_categorie as $_sous_categorie) {
         echo "<h3>" . $_sous_categorie["nom"] . "</h3><br>\n";
         // ---- Recherche & affichage des produits disponibles pour cette sous catégorie ---- //
         if (1 == 1) {
             unset($recherche);
             $recherche["id_categorie"] = $_sous_categorie["id"];
             $recherche["online"] = '1';
             $liste_produit = $produit->getListe($recherche, $debug);
             if (!empty($liste_produit)) {
                 foreach ($liste_produit as $_produit) {
                     $id_produit = $_produit["id"];
                     $nom = $_produit["nom"];
                     $image_defaut = $produit_image->getImageDefaut($id_produit, $debug);
                     echo "\t<div class='large-4 medium-4 small-12 columns'>\n";
                     echo "\t\t<a href='/amenagement-detail.php?id=" . $id_produit . "' data-fancybox-group='amenagementbois' title=''><img src='/photos/produit/accueil" . $image_defaut["fichier"] . "' title='" . $nom . "' /></a>\n";
                     echo "\t</div>\n";
                 }
                 echo "\t<div style='clear:both;'></div>\n";
             }
         }
         // ---------------------------------------------------------------------------------- //
     }
 }