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

    Baschtl

    • Mitglied
    • Beiträge: 165
    Hallo,

    ich würde gerne zusätzlich zu den beiden Boxen "content" und "information" noch eine dritte Box "service" anlegen, die ebenfalls bestimmte Content-Seiten ausliest.

    Ich habe dafür jeweils

    boxes/box_information.html und
    source/boxes/information.php

    kopiert und in

    boxes/box_service.html und
    source/boxes/service.php

    umbenannt sowie deren Inhalte dementsprechend angepasst (alles mit box_information in box_service umgeschrieben etc.).

    In source/boxes.php habe ich

    require_once(DIR_FS_BOXES . 'service.php');

    hinzugefügt und in der index.html des Templates

    {$box_SERVICE}

    eingefügt.

    Über die Datenbank habe ich ein weiteres file_flag mit Namen Service und der ID 2 angelegt, was im Backend im Content Dropdown Menü auch angezeigt wird.

    In der

    source/boxes/service.php

    habe ich noch die file_flag ID in 2 umgeschrieben...

    Trotzdem wird die Box nicht ausgegeben... habe ich noch etwas vergessen bzw. falsch gemacht???

    Linkback: https://www.modified-shop.org/forum/index.php?topic=39167.0

    h-h-h

    • modified Team
    • Beiträge: 4.562
    Re: zusätzliche Box für Conent-Seiten im Modified 2.0 Shop
    Antwort #1 am: 05. Juni 2018, 18:11:16
    Hallo,
    wie sieht deine service.php aus?
    Gibt es irgendwelche Informationen in den Log-Dateien?

     :glaskugel:

    Gruß, h-h-h

    Baschtl

    • Mitglied
    • Beiträge: 165
    Re: zusätzliche Box für Conent-Seiten im Modified 2.0 Shop
    Antwort #2 am: 06. Juni 2018, 09:27:39
    Hier erst mal der Inhalt der 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_information_element)) {
            $first_information_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_information_element)) {
         xtc_show_content($first_information_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);
    ?>

    Baschtl

    • Mitglied
    • Beiträge: 165
    Re: zusätzliche Box für Conent-Seiten im Modified 2.0 Shop
    Antwort #3 am: 06. Juni 2018, 15:54:57
    Keiner eine Idee was das Problem sein könnte???

    Modulfux

    • Experte
    • Beiträge: 3.590
    • Geschlecht:
    Re: zusätzliche Box für Conent-Seiten im Modified 2.0 Shop
    Antwort #4 am: 06. Juni 2018, 16:04:49
    Füge unter:
    Code: PHP  [Auswählen]
    while ($content_data = xtc_db_fetch_array($content_query, true)) {

    folgendes ein:
    Code: PHP  [Auswählen]
    echo('<pre> '.__LINE__.': '.print_r($content_data, true).'</pre><hr />');

    und guck dann auf der Startseite des Shops, ob du eine Ausgabe bekommst.

    Baschtl

    • Mitglied
    • Beiträge: 165
    Re: zusätzliche Box für Conent-Seiten im Modified 2.0 Shop
    Antwort #5 am: 06. Juni 2018, 16:14:18
    ja, ein Array mit einigen Content-Seiten, die ich bereits der neuen Box über das Backend zugewiesen hatte

    Modulfux

    • Experte
    • Beiträge: 3.590
    • Geschlecht:
    Re: zusätzliche Box für Conent-Seiten im Modified 2.0 Shop
    Antwort #6 am: 06. Juni 2018, 16:16:39
    Hmm, dann müsste man sich das wirklich auf dem Server ansehen und debuggen. Oder hast du vllt. einen Kundengruppencheck aktiviert und die Box wird für bestimmt Kundengruppen nicht angezeigt?

    Baschtl

    • Mitglied
    • Beiträge: 165
    Re: zusätzliche Box für Conent-Seiten im Modified 2.0 Shop
    Antwort #7 am: 06. Juni 2018, 16:23:03
    Ich schau mir das morgen in aller Frische noch mal an und melde mich dann wieder ;-)

    hpzeller

    • Experte
    • Beiträge: 4.129
    • Geschlecht:
    Re: zusätzliche Box für Conent-Seiten im Modified 2.0 Shop
    Antwort #8 am: 06. Juni 2018, 21:56:55
    Hallo Baschtl,

    in dem von dir geposteten Code ist folgende Zeile auskommentiert

    Code: PHP  [Auswählen]
    //  require_once (DIR_FS_CATALOG.'templates/'.CURRENT_TEMPLATE.'/source/inc/close_ul_tags.inc.php');

    Die in der close_ul_tags.inc.php enthaltene Funktion close_ul_tags() wird aber in der Datei templates/dein_template/source/inc/xtc_show_content.inc.php , welche du ja ein Zeile oberhalb einbindest, standardmässig benötigt.

    Gruss
    Hanspeter

    Baschtl

    • Mitglied
    • Beiträge: 165
    Re: zusätzliche Box für Conent-Seiten im Modified 2.0 Shop
    Antwort #9 am: 07. Juni 2018, 16:05:40
    Hallo Hanspeter,

    ich hatte als Basis für die Kopie der Box information.php eine Datei aus einem Kauftemplate verwendet... da war diese Zeile bereits auskommentiert...

    Um ganz sicher zu gehen würde ich es gerne noch einmal mit den Original Modified 2.0 Dateien versuchen...

    Waren denn meine Schritte sonst soweit richtig oder habe ich noch etwas vergessen oder falsch gemacht?

    Grüße
    Baschtl

    hpzeller

    • Experte
    • Beiträge: 4.129
    • Geschlecht:
    Re: zusätzliche Box für Conent-Seiten im Modified 2.0 Shop
    Antwort #10 am: 07. Juni 2018, 19:51:15
    Wenn du den Code aus einem Kauftemplate hast, dann entspricht in diesem Template die templates/dein_template/source/inc/xtc_show_content.inc.php wahrscheinlich auch nicht mehr dem Original, insofern dürfte die auskommentierte Codezeile kaum die Ursache deines Problems sein, zumal das Fehlen einer Funktion in PHP zu einem Fatal error führt und damit zur Folge hat, das gar keine Ausgabe an den Browser erfolgt, aber das scheint ja bei dir nicht der Fall zu sein.

    [...]
    In source/boxes.php habe ich

    require_once(DIR_FS_BOXES . 'service.php');

    hinzugefügt und in der index.html des Templates

    {$box_SERVICE}

    eingefügt.
    [..]

    Hier frage ich mal ganz naiv, wo im Code hast du das eingefügt?

    Tipp: Füge doch mal in deinem geposteten Code vor

    Code: PHP  [Auswählen]
    $box_smarty->assign('BOX_CONTENT', $content_string);

    folgendes ein

    Code: PHP  [Auswählen]
    echo 'Content: '.$content_string;

    und schau die die Ausgabe im Browser an.

    Gruss
    Hanspeter

    Baschtl

    • Mitglied
    • Beiträge: 165
    Re: zusätzliche Box für Conent-Seiten im Modified 2.0 Shop
    Antwort #11 am: 11. Juni 2018, 10:43:14
    Ich habe jetzt noch mal das Modified-Template als Grundlage genommen...
    Hier der Code aller angepassten Dateien:

    /templates/tpl_modified/source/boxes/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_information_element)) {
            $first_information_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_information_element)) {
         xtc_show_content($first_information_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);
    ?>

    In der Datenbank:

    file_flag   file_flag_name
    0    information
    1    content
    2    service

    /templates/tpl_modified/boxes/box_service.html
    Code: PHP  [Auswählen]
    {config_load file="$language/lang_$language.conf" section="boxes"}
    {config_load file="lang_`$language`.custom"}
    {if isset($BOX_CONTENT) && $BOX_CONTENT != ''}
      <div class="box3">
        <div class="box3_header">{#heading_servicebox#}</div>
       <div class="box3_line"></div>
        <ul class="footerlist">
          {$BOX_CONTENT}
        </ul>
      </div>
    {/if}

    /templates/tpl_modified/source/boxes.php
    Code: PHP  [Auswählen]
    <?php
    /* -----------------------------------------------------------------------------------------
       $Id: boxes.php 10541 2016-12-21 08:43:33Z Tomcraft $

       modified eCommerce Shopsoftware
       http://www.modified-shop.org

       Copyright (c) 2009 - 2013 [www.modified-shop.org]
       -----------------------------------------------------------------------------------------
       based on:
       (c) 2006 XT-Commerce
       
       Released under the GNU General Public License
       ---------------------------------------------------------------------------------------*/


    // css buttons
    if (file_exists(DIR_FS_CATALOG.'templates/'.CURRENT_TEMPLATE.'/source/inc/css_button.inc.php')) {
      require_once ('templates/'.CURRENT_TEMPLATE.'/source/inc/css_button.inc.php');
    }

    // define full content sites
    $fullcontent = array(FILENAME_CHECKOUT_SHIPPING,
                         FILENAME_CHECKOUT_PAYMENT,
                         FILENAME_CHECKOUT_CONFIRMATION,
                         FILENAME_CHECKOUT_SUCCESS,
                         FILENAME_CHECKOUT_SHIPPING_ADDRESS,
                         FILENAME_CHECKOUT_PAYMENT_ADDRESS,
                         FILENAME_ACCOUNT,
                         FILENAME_ACCOUNT_EDIT,
                         FILENAME_ACCOUNT_HISTORY,
                         FILENAME_ACCOUNT_HISTORY_INFO,
                         FILENAME_ACCOUNT_PASSWORD,
                         FILENAME_ACCOUNT_DELETE,
                         FILENAME_ACCOUNT_CHECKOUT_EXPRESS,
                         FILENAME_CREATE_ACCOUNT,
                         FILENAME_CREATE_GUEST_ACCOUNT,
                         FILENAME_ADDRESS_BOOK,
                         FILENAME_ADDRESS_BOOK_PROCESS,
                         FILENAME_PASSWORD_DOUBLE_OPT,
                         FILENAME_ADVANCED_SEARCH_RESULT,
                         FILENAME_ADVANCED_SEARCH,
                         FILENAME_SHOPPING_CART,
                         FILENAME_GV_SEND,
                         FILENAME_NEWSLETTER,
                         FILENAME_LOGIN,
                         FILENAME_CONTENT,
                         FILENAME_REVIEWS,
                         FILENAME_WISHLIST,
                         FILENAME_CHECKOUT_PAYMENT_IFRAME,
                         );

    // -----------------------------------------------------------------------------------------
    //      full content
    // -----------------------------------------------------------------------------------------
      if (!in_array(basename($PHP_SELF), $fullcontent)) {
        require_once(DIR_FS_BOXES . 'categories.php');
        require_once(DIR_FS_BOXES . 'manufacturers.php');
        require_once(DIR_FS_BOXES . 'last_viewed.php');
      } else {
        // smarty full content
        $smarty->assign('fullcontent', true);  
      }

    // -----------------------------------------------------------------------------------------
    //      always visible
    // -----------------------------------------------------------------------------------------
      require_once(DIR_FS_BOXES . 'search.php');
      require_once(DIR_FS_BOXES . 'content.php');
      require_once(DIR_FS_BOXES . 'information.php');
      require_once(DIR_FS_BOXES . 'service.php');
      require_once(DIR_FS_BOXES . 'miscellaneous.php');
      require_once(DIR_FS_BOXES . 'languages.php');
      require_once(DIR_FS_BOXES . 'infobox.php');
      require_once(DIR_FS_BOXES . 'loginbox.php');
      if (!defined('MODULE_NEWSLETTER_STATUS') || MODULE_NEWSLETTER_STATUS == 'true') {
        require_once(DIR_FS_BOXES . 'newsletter.php');
      }
      if (defined('MODULE_TS_TRUSTEDSHOPS_ID')
          && (MODULE_TS_WIDGET == '1'
              || (MODULE_TS_REVIEW_STICKER != '' && MODULE_TS_REVIEW_STICKER_STATUS == '1'))
          )
      {
        require_once(DIR_FS_BOXES . 'trustedshops.php');
      }
    // -----------------------------------------------------------------------------------------
    //      only if show price
    // -----------------------------------------------------------------------------------------
      if ($_SESSION['customers_status']['customers_status_show_price'] == '1') {
        require_once(DIR_FS_BOXES . 'add_a_quickie.php');
        require_once(DIR_FS_BOXES . 'shopping_cart.php');
        if (defined('MODULE_WISHLIST_SYSTEM_STATUS') && MODULE_WISHLIST_SYSTEM_STATUS == 'true') {
          require_once(DIR_FS_BOXES . 'wishlist.php');
        }
      }
    // -----------------------------------------------------------------------------------------
    //      hide in search
    // -----------------------------------------------------------------------------------------
      if (substr(basename($PHP_SELF), 0,8) != 'advanced' && WHATSNEW_CATEGORIES === false) {
        require_once(DIR_FS_BOXES . 'whats_new.php');
      }
    // -----------------------------------------------------------------------------------------
    //      admins only
    // -----------------------------------------------------------------------------------------
      if ($_SESSION['customers_status']['customers_status'] == '0') {
        require_once(DIR_FS_BOXES . 'admin.php');
        $smarty->assign('is_admin', true);
      }
    // -----------------------------------------------------------------------------------------
    //      product details
    // -----------------------------------------------------------------------------------------
      if ($product->isProduct() === true) {
        require_once(DIR_FS_BOXES . 'manufacturer_info.php');
      } else {
        require_once(DIR_FS_BOXES . 'best_sellers.php');
        if ($_SESSION['customers_status']['customers_status_specials'] == '1' && SPECIALS_CATEGORIES === false) {
          require_once(DIR_FS_BOXES . 'specials.php');
        }
      }
    // -----------------------------------------------------------------------------------------
    //      only logged id users
    // -----------------------------------------------------------------------------------------
      if (isset($_SESSION['customer_id'])) {
        require_once(DIR_FS_BOXES . 'order_history.php');
      }
    // -----------------------------------------------------------------------------------------
    //      only if reviews allowed
    // -----------------------------------------------------------------------------------------
      if ($_SESSION['customers_status']['customers_status_read_reviews'] == '1') {
        require_once(DIR_FS_BOXES . 'reviews.php');
      }
    // -----------------------------------------------------------------------------------------
    //      hide during checkout
    // -----------------------------------------------------------------------------------------
      if (substr(basename($PHP_SELF), 0, 8) != 'checkout') {
        require_once(DIR_FS_BOXES . 'currencies.php');
      }
    // -----------------------------------------------------------------------------------------

    // -----------------------------------------------------------------------------------------
    // Smarty home
    // -----------------------------------------------------------------------------------------
    $smarty->assign('home', ((basename($PHP_SELF) == FILENAME_DEFAULT && !isset($_GET['cPath']) && !isset($_GET['manufacturers_id'])) ? 1 : 0));

    // -----------------------------------------------------------------------------------------
    // Smarty bestseller
    // -----------------------------------------------------------------------------------------
    $smarty->assign('bestseller', strpos($PHP_SELF, FILENAME_LOGOFF)
                               || strpos($PHP_SELF, FILENAME_CHECKOUT_SUCCESS)
                               || strpos($PHP_SELF, FILENAME_SHOPPING_CART)
                               || strpos($PHP_SELF, FILENAME_NEWSLETTER));
    // -----------------------------------------------------------------------------------------

    $smarty->assign('tpl_path', DIR_WS_BASE.'templates/'.CURRENT_TEMPLATE.'/');
    ?>

    im Footer der Template index.html
    Code: PHP  [Auswählen]
      <div id="layout_footer_inner" class="cf">
        {if isset($box_CONTENT)}<div class="footer_box first">{$box_CONTENT}</div>{/if}
        {if isset($box_INFORMATION)}<div class="footer_box">{$box_INFORMATION}</div>{/if}
        {if isset($box_SERVICE)}<div class="footer_box">{$box_SERVICE}</div>{/if}
        {if isset($box_MISCELLANEOUS)}<div class="footer_box">{$box_MISCELLANEOUS}</div>{/if}
        {if isset($box_NEWSLETTER)}<div class="footer_box">{$box_NEWSLETTER}</div>{/if}
      </div>

    Und in der /lang/german/lang_german.conf im Bereich [Boxes] diese Zeile hinzugefügt:
    heading_servicebox = 'Service'

    Im Backend eine Content-Seite "Test" angelegt und der die Box "service" zugewiesen.

    Im Footer wird jetzt zwar die Box ausgegeben, aber nicht die Content-Seite darin.

    Baschtl

    • Mitglied
    • Beiträge: 165
    Re: zusätzliche Box für Conent-Seiten im Modified 2.0 Shop
    Antwort #12 am: 11. Juni 2018, 11:03:48
    Tipp: Füge doch mal in deinem geposteten Code vor

    Code: PHP  [Auswählen]
    $box_smarty->assign('BOX_CONTENT', $content_string);

    folgendes ein

    Code: PHP  [Auswählen]
    echo 'Content: '.$content_string;

    und schau die die Ausgabe im Browser an.

    Wenn ich Deine Code-Zeile einfüge bekomme ich ein leeres Ergebnis...

    hpzeller

    • Experte
    • Beiträge: 4.129
    • Geschlecht:
    Re: zusätzliche Box für Conent-Seiten im Modified 2.0 Shop
    Antwort #13 am: 11. Juni 2018, 11:13:11
    Ersetze in /templates/tpl_modified/source/boxes/service.php mal testweise AND file_flag='2' mit AND file_flag='1' oder AND file_flag='0'

    Gruss
    Hanspeter

    Baschtl

    • Mitglied
    • Beiträge: 165
    Re: zusätzliche Box für Conent-Seiten im Modified 2.0 Shop
    Antwort #14 am: 11. Juni 2018, 11:17:20
    AND file_flag='0' geht
    AND file_flag='1' ist auch leer
    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