Shop Hosting
Neuigkeiten
  • Die modified eCommerce Shopsoftware ist kostenlos, aber nicht umsonst.
    Spenden
  • Damit wir die modified eCommerce Shopsoftware auch zukünftig kostenlos anbieten können:
    Spenden
  • Thema: zusätzliche Box für Conent-Seiten im Modified 2.0 Shop

    karsta.de

    • Experte
    • Beiträge: 3.157
    Re: zusätzliche Box für Conent-Seiten im Modified 2.0 Shop
    Antwort #15 am: 11. Juni 2018, 11:20:57
    Wenn flag = 2 ist, hast du im Content-Manager "service" auch einen Content zugewiesen?

    hpzeller

    • Experte
    • Beiträge: 4.129
    • Geschlecht:
    Re: zusätzliche Box für Conent-Seiten im Modified 2.0 Shop
    Antwort #16 am: 11. Juni 2018, 11:22:53
    und wie stehts mit AND file_flag=2 bzw. AND file_flag=1

    Gruss
    Hanspeter

    Baschtl

    • Mitglied
    • Beiträge: 165
    Re: zusätzliche Box für Conent-Seiten im Modified 2.0 Shop
    Antwort #17 am: 11. Juni 2018, 11:25:31
    nur AND file_flag=0 funktioniert... und gibt die sitemap aus

    Baschtl

    • Mitglied
    • Beiträge: 165
    Re: zusätzliche Box für Conent-Seiten im Modified 2.0 Shop
    Antwort #18 am: 11. Juni 2018, 11:26:03
    Wenn flag = 2 ist, hast du im Content-Manager "service" auch einen Content zugewiesen?

    ja... in der Backend Vorschau wird es auch angezeigt

    karsta.de

    • Experte
    • Beiträge: 3.157
    Re: zusätzliche Box für Conent-Seiten im Modified 2.0 Shop
    Antwort #19 am: 11. Juni 2018, 11:31:41
    Dann wähle für die Sitemap mal die Box "service" aus und teste im Frontend, ob die unter Service angezeigt wird.

    hpzeller

    • Experte
    • Beiträge: 4.129
    • Geschlecht:
    Re: zusätzliche Box für Conent-Seiten im Modified 2.0 Shop
    Antwort #20 am: 11. Juni 2018, 11:36:47
    nur AND file_flag=0 funktioniert... und gibt die sitemap aus

    Ja aber dann funktioniert jetzt meiner Meinung nach entweder deine DB-Abfrage in der /templates/tpl_modified/source/boxes/service.php oder das Erzeugen des Strings in der /templates/tpl_modified//source/inc/xtc_show_content.inc.php nicht.

    Führe nochmals Antwort #4 aus um die  DB-Abfrage zu kontrolieren.

    Gruss
    Hanspeter

    Baschtl

    • Mitglied
    • Beiträge: 165
    Re: zusätzliche Box für Conent-Seiten im Modified 2.0 Shop
    Antwort #21 am: 11. Juni 2018, 11:37:52
    Dann wähle für die Sitemap mal die Box "service" aus und teste im Frontend, ob die unter Service angezeigt wird.

    Dann wird's richtig merkwürdig... die Box "Informationen" verschwindet komplett und alle Seiten, die eigentlich schon in der Box "Mehr über..." (also content) ausgegeben werden, erscheinen in "Service" noch einmal zusätzlich...  :-O

    karsta.de

    • Experte
    • Beiträge: 3.157
    Re: zusätzliche Box für Conent-Seiten im Modified 2.0 Shop
    Antwort #22 am: 11. Juni 2018, 11:59:30
    Ersetze mal den gesamten Inhalt deiner service.php:
    Code: PHP  [Auswählen]
    <?php
    // include smarty
    include(DIR_FS_BOXES_INC . 'smarty_default.php');

    // set cache id
    $cache_id = md5($_SESSION['language'].$_SESSION['customers_status']['customers_status_id'].(isset($coPath) ? $coPath : '0'));

    if (!$box_smarty->is_cached(CURRENT_TEMPLATE.'/boxes/box_service.html', $cache_id) || !$cache) {

      // include needed functions
      require_once (DIR_FS_CATALOG.'templates/'.CURRENT_TEMPLATE.'/source/inc/xtc_show_content.inc.php');
      require_once (DIR_FS_CATALOG.'templates/'.CURRENT_TEMPLATE.'/source/inc/close_ul_tags.inc.php');
     
      $content_array = array();
      $content_string = '';

        $content_query = xtDBquery("SELECT content_id,
                                         categories_id,
                                         parent_id,
                                         content_title,
                                         content_group
                                    FROM "
    .TABLE_CONTENT_MANAGER."
                                   WHERE languages_id='"
    .(int) $_SESSION['languages_id']."'
                                     AND file_flag='2'
                                         "
    .CONTENT_CONDITIONS."
                                     AND content_status='1'
                                     AND content_active='1'
                                     AND trim(content_title) != ''
                                     AND parent_id='0'
                                ORDER BY sort_order"
    );

      if (xtc_db_num_rows($content_query, true) > 0) {
                    unset ($prev_cid);
                    unset ($first_content_element);
        while ($content_data = xtc_db_fetch_array($content_query, true)) {
          $content_array[$content_data['content_id']] = array(
              'name' => $content_data['content_title'],
              'parent' => $content_data['parent_id'],
              'level' => 0,
              'coID' => $content_data['content_group'],
              'path' => $content_data['content_id'],
              'next_id' => false
            );

          if (isset ($prev_cid)) {
            $content_array[$prev_cid]['next_id'] = $content_data['content_id'];
          }

          $prev_cid = $content_data['content_id'];

          if (!isset ($first_service_element)) {
            $first_service_element = $content_data['content_id'];
          }
              }

        if (isset($coPath)) {
          $new_path = '';
          $coid = explode('_', $coPath);
          reset($coid);
          while (list ($key, $value) = each($coid)) {
            unset ($prev_cid);
            unset ($first_cid);
            $content_query = xtDBquery("SELECT content_id,
                                               parent_id,
                                               content_title,
                                               content_group
                                          FROM "
    .TABLE_CONTENT_MANAGER."
                                         WHERE languages_id='"
    .(int) $_SESSION['languages_id']."'
                                           AND file_flag='2'
                                               "
    .CONTENT_CONDITIONS."
                                           AND content_status='1'
                                           AND content_active='1'
                                           AND trim(content_title) != ''
                                           AND parent_id='"
    .$value."'
                                      ORDER BY sort_order"
    );

            if (xtc_db_num_rows($content_query, true) > 0) {
              $new_path .= $value;
              while ($content = xtc_db_fetch_array($content_query, true)) {
                $content_array[$content['content_id']] = array(
                    'name' => $content['content_title'],
                    'parent' => $content['parent_id'],
                    'level' => $key +1,
                    'coID' => $content['content_group'],
                    'path' => $new_path.'_'.$content['content_id'],
                    'next_id' => false
                  );
                if (isset ($prev_cid)) {
                  $content_array[$prev_cid]['next_id'] = $content['content_id'];
                }
                $prev_cid = $content['content_id'];
                if (!isset ($first_cid)) {
                  $first_cid = $content['content_id'];
                }
                $last_cid = $content['content_id'];
              }

              $content_array[$last_cid]['next_id'] = isset($content_array[$value]['next_id']) ? $content_array[$value]['next_id'] : 0;
              $content_array[$value]['next_id'] = $first_cid;
              $new_path .= '_';
            } else {
              break;
            }
          }
        }
     
        if(!empty($first_service_element)) {
         xtc_show_content($first_service_element);
        }
     
        $box_smarty->assign('BOX_CONTENT', $content_string);
      }
    }

    if (!$cache) {
      $box_service = $box_smarty->fetch(CURRENT_TEMPLATE.'/boxes/box_service.html');
    } else {
      $box_service = $box_smarty->fetch(CURRENT_TEMPLATE.'/boxes/box_service.html', $cache_id);
    }

    $smarty->assign('box_SERVICE', $box_service);
    ?>
     

    Und teste erneut.

    Baschtl

    • Mitglied
    • Beiträge: 165
    Re: zusätzliche Box für Conent-Seiten im Modified 2.0 Shop
    Antwort #23 am: 11. Juni 2018, 12:25:29
    YES!!!!!!!!!! Dann geht's  :-) Danke!!!!
    Was genau war in Deinem Code denn jetzt anders???

    karsta.de

    • Experte
    • Beiträge: 3.157
    Re: zusätzliche Box für Conent-Seiten im Modified 2.0 Shop
    Antwort #24 am: 11. Juni 2018, 12:39:32
    Ich habe $first_information_element in $first_service_element geändert.

    Baschtl

    • Mitglied
    • Beiträge: 165
    Re: zusätzliche Box für Conent-Seiten im Modified 2.0 Shop
    Antwort #25 am: 11. Juni 2018, 12:40:42
    Hab's schon selbst entdeckt... ich Depp  :doh:

    Ich hatte vergessen

    Code: PHP  [Auswählen]
     if (!isset ($first_service_element)) {
            $first_service_element = $content_data['content_id'];
          }

    und

    Code: PHP  [Auswählen]
       if(!empty($first_service_element)) {
         xtc_show_content($first_service_element);
        }

    umzuschreiben...
    10 Antworten
    7812 Aufrufe
    03. April 2015, 10:46:01 von Nils
    10 Antworten
    4539 Aufrufe
    14. Oktober 2017, 14:46:41 von web4design
    2 Antworten
    2149 Aufrufe
    11. Februar 2010, 13:25:31 von Johnnycash
    5 Antworten
    3936 Aufrufe
    23. März 2013, 17:07:12 von remo
               
    anything