Ankündigung

Einklappen
Keine Ankündigung bisher.

"Empfohlene Artikel" ganz nach oben?

Einklappen
X
 
  • Filter
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge

    "Empfohlene Artikel" ganz nach oben?

    Ich lasse auf der Startseite die Unterkategorien einer Hauptkategorie anzeigen. Ich möchte darüber aber noch die "Empfohlenen Artikel" anzeigen lassen. Wie ist das möglich?

    Das betreffende Template ist "includes/templates/TEMPALTENAME/templates/tpl_index_categories.php", so weit bin ich schon.
    Zuletzt geändert von Subhash; 26.05.2011, 14:37.

    #2
    Probier mal die Passage mit den "featured_products" auszuschneiden und über die
    "categories_description" zu setzen. Könnte funktionieren.

    Kommentar


      #3
      Zitat von jjuno Beitrag anzeigen
      Probier mal die Passage mit den "featured_products" auszuschneiden und über die
      "categories_description" zu setzen. Könnte funktionieren.
      Hab ich getan, das funktioniert nicht, weil dazu auch
      Code:
      $show_display_category = $db->Execute(SQL_SHOW_PRODUCT_INFO_CATEGORY);
      
      while (!$show_display_category->EOF) { ... }
      nötig ist. Wenn ich das aber kopiere und nach oben setze, wird überhaupt nichts mehr angezeigt.

      Kommentar


        #4
        Stimmt, wird wohl eher die tpl_categories.php sein.

        Kommentar


          #5
          Nein, es ist schon das erwähnte File.

          Kommentar


            #6
            Die reihenfolge kannst du ändern im includes/templates/DEINTEMPLATE/templates/tpl_index.php

            Kommentar


              #7
              Tut mir leid, diesen Dateinnamen kann ich im gesamten ZenCart 1.3.9 nicht finden, in meinem Template natürlich auch nicht. Die Datei muss anders heißen.

              Kommentar


                #8
                entschuldigung das muss sein tpl_index_default.php

                Kommentar


                  #9
                  Nein, zumindest in dem Fall, dass auf der Startseite eine Kategorie angezeigt wird, ist sie es nicht, das habe ich überprüft.

                  Es ist, wie oben schon gesagt, "includes/templates/TEMPALTENAME/templates/tpl_index_categories.php". Nur wie man die "empfohlenen Artikel" raufbekommt, das ist die Frage.

                  Kommentar


                    #10
                    Doch ist es...

                    Im original steht:
                    PHP-Code:
                    <?php 
                    /** 
                     * Page Template 
                     * 
                     * Main index page<br /> 
                     * Displays greetings, welcome text (define-page content), and various centerboxes depending on switch settings in Admin<br /> 
                     * Centerboxes are called as necessary 
                     * 
                     * @package templateSystem 
                     * @copyright Copyright 2003-2010 Zen Cart Development Team 
                     * @copyright Portions Copyright 2003 osCommerce 
                     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0 
                     * @version $Id: tpl_index_default.php 3464 2006-04-19 00:07:26Z ajeh $ 
                     */ 
                    ?> 
                    <div class="centerColumn" id="indexDefault"> 
                    <h1 id="indexDefaultHeading"><?php echo HEADING_TITLE?></h1> 
                     
                    <?php if (SHOW_CUSTOMER_GREETING == 1) { ?> 
                    <h2 class="greeting"><?php echo zen_customer_greeting(); ?></h2> 
                    <?php ?> 
                     
                    <!-- deprecated - to use uncomment this section 
                    <?php if (TEXT_MAIN) { ?> 
                    <div id="" class="content"><?php echo TEXT_MAIN?></div> 
                    <?php ?>--> 
                     
                    <!-- deprecated - to use uncomment this section 
                    <?php if (TEXT_INFORMATION) { ?> 
                    <div id="" class="content"><?php echo TEXT_INFORMATION?></div> 
                    <?php ?>--> 
                     
                    <?php if (DEFINE_MAIN_PAGE_STATUS >= and DEFINE_MAIN_PAGE_STATUS <= 2) { ?> 
                    <?php 
                    /** 
                     * get the Define Main Page Text 
                     */ 
                    ?> 
                    <div id="indexDefaultMainContent" class="content"><?php require($define_page); ?></div> 
                    <?php ?> 
                     
                    <?php 
                      $show_display_category 
                    $db->Execute(SQL_SHOW_PRODUCT_INFO_MAIN); 
                      while (!
                    $show_display_category->EOF) { 
                    ?> 
                     
                    <?php if ($show_display_category->fields['configuration_key'] == 'SHOW_PRODUCT_INFO_MAIN_FEATURED_PRODUCTS') { ?> 
                    <?php 
                    /** 
                     * display the Featured Products Center Box 
                     */ 
                    ?> 
                    <?php require($template->get_template_dir('tpl_modules_featured_products.php',DIR_WS_TEMPLATE$current_page_base,'templates'). '/tpl_modules_featured_products.php'); ?> 
                    <?php ?> 
                     
                    <?php if ($show_display_category->fields['configuration_key'] == 'SHOW_PRODUCT_INFO_MAIN_SPECIALS_PRODUCTS') { ?> 
                    <?php 
                    /** 
                     * display the Special Products Center Box 
                     */ 
                    ?> 
                    <?php require($template->get_template_dir('tpl_modules_specials_default.php',DIR_WS_TEMPLATE$current_page_base,'templates'). '/tpl_modules_specials_default.php'); ?> 
                    <?php ?> 
                     
                    <?php if ($show_display_category->fields['configuration_key'] == 'SHOW_PRODUCT_INFO_MAIN_NEW_PRODUCTS') { ?> 
                    <?php 
                    /** 
                     * display the New Products Center Box 
                     */ 
                    ?> 
                    <?php require($template->get_template_dir('tpl_modules_whats_new.php',DIR_WS_TEMPLATE$current_page_base,'templates'). '/tpl_modules_whats_new.php'); ?> 
                    <?php ?> 
                     
                    <?php if ($show_display_category->fields['configuration_key'] == 'SHOW_PRODUCT_INFO_MAIN_UPCOMING') { ?> 
                    <?php 
                    /** 
                     * display the Upcoming Products Center Box 
                     */ 
                    ?> 
                    <?php include(DIR_WS_MODULES zen_get_module_directory(FILENAME_UPCOMING_PRODUCTS)); ?><?php ?> 
                     
                     
                    <?php 
                      $show_display_category
                    ->MoveNext(); 
                    // !EOF 
                    ?> 
                    </div>
                    Das ändern auf:

                    PHP-Code:
                    <?php 
                    /** 
                     * Page Template 
                     * 
                     * Main index page<br /> 
                     * Displays greetings, welcome text (define-page content), and various centerboxes depending on switch settings in Admin<br /> 
                     * Centerboxes are called as necessary 
                     * 
                     * @package templateSystem 
                     * @copyright Copyright 2003-2010 Zen Cart Development Team 
                     * @copyright Portions Copyright 2003 osCommerce 
                     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0 
                     * @version $Id: tpl_index_default.php 3464 2006-04-19 00:07:26Z ajeh $ 
                     */ 
                    ?> 
                    <div class="centerColumn" id="indexDefault"> 
                    <h1 id="indexDefaultHeading"><?php echo HEADING_TITLE?></h1> 
                     
                    <?php if (SHOW_CUSTOMER_GREETING == 1) { ?> 
                    <h2 class="greeting"><?php echo zen_customer_greeting(); ?></h2> 
                    <?php ?> 
                     
                    <!-- deprecated - to use uncomment this section 
                    <?php if (TEXT_MAIN) { ?> 
                    <div id="" class="content"><?php echo TEXT_MAIN?></div> 
                    <?php ?>--> 
                     
                    <!-- deprecated - to use uncomment this section 
                    <?php if (TEXT_INFORMATION) { ?> 
                    <div id="" class="content"><?php echo TEXT_INFORMATION?></div> 
                    <?php ?>--> 
                     
                    <?php if (DEFINE_MAIN_PAGE_STATUS >= and DEFINE_MAIN_PAGE_STATUS <= 2) { ?> 
                    <?php 
                    /** 
                     * get the Define Main Page Text 
                     */ 
                    ?> 
                    <div id="indexDefaultMainContent" class="content"><?php require($define_page); ?></div> 
                    <?php ?> 

                    <?php if ($show_display_category->fields['configuration_key'] == 'SHOW_PRODUCT_INFO_MAIN_FEATURED_PRODUCTS') { ?> 
                    <?php 
                    /** 
                     * display the Featured Products Center Box 
                     */ 
                    ?> 
                    <?php require($template->get_template_dir('tpl_modules_featured_products.php',DIR_WS_TEMPLATE$current_page_base,'templates'). '/tpl_modules_featured_products.php'); ?> 
                    <?php ?> 
                     
                    <?php if ($show_display_category->fields['configuration_key'] == 'SHOW_PRODUCT_INFO_MAIN_SPECIALS_PRODUCTS') { ?>
                    <?php 
                    /** 
                     * display the Category Center Box 
                     */ 
                    ?> 
                    <?php 
                      $show_display_category 
                    $db->Execute(SQL_SHOW_PRODUCT_INFO_MAIN); 
                      while (!
                    $show_display_category->EOF) { 
                    ?> 
                     
                    <?php if ($show_display_category->fields['configuration_key'] == 'SHOW_PRODUCT_INFO_MAIN_FEATURED_PRODUCTS') { ?> 
                    <?php 
                    /** 
                     * display the Featured Products Center Box 
                     */ 
                    ?> 
                    <?php require($template->get_template_dir('tpl_modules_featured_products.php',DIR_WS_TEMPLATE$current_page_base,'templates'). '/tpl_modules_featured_products.php'); ?> 
                    <?php ?> 
                     
                    <?php if ($show_display_category->fields['configuration_key'] == 'SHOW_PRODUCT_INFO_MAIN_SPECIALS_PRODUCTS') { ?> 
                    <?php 
                    /** 
                     * display the Special Products Center Box 
                     */ 
                    ?> 
                    <?php require($template->get_template_dir('tpl_modules_specials_default.php',DIR_WS_TEMPLATE$current_page_base,'templates'). '/tpl_modules_specials_default.php'); ?> 
                    <?php ?> 
                     
                    <?php if ($show_display_category->fields['configuration_key'] == 'SHOW_PRODUCT_INFO_MAIN_NEW_PRODUCTS') { ?> 
                    <?php 
                    /** 
                     * display the New Products Center Box 
                     */ 
                    ?> 
                    <?php require($template->get_template_dir('tpl_modules_whats_new.php',DIR_WS_TEMPLATE$current_page_base,'templates'). '/tpl_modules_whats_new.php'); ?> 
                    <?php ?> 
                     
                    <?php if ($show_display_category->fields['configuration_key'] == 'SHOW_PRODUCT_INFO_MAIN_UPCOMING') { ?> 
                    <?php 
                    /** 
                     * display the Upcoming Products Center Box 
                     */ 
                    ?> 
                    <?php include(DIR_WS_MODULES zen_get_module_directory(FILENAME_UPCOMING_PRODUCTS)); ?><?php ?> 
                     
                     
                    <?php 
                      $show_display_category
                    ->MoveNext(); 
                    // !EOF 
                    ?> 
                    </div>
                    Aber darfst ruhig irgendwo anders suchen.

                    Kommentar


                      #11
                      Zitat von eentje Beitrag anzeigen
                      Doch ist es...

                      […]

                      Aber darfst ruhig irgendwo anders suchen.
                      Entschuldige, ich rede nicht irgendwie daher, ich habe es überprüft. Ich habe einen Kommentar in diverse Dateien geschrieben und den dann im Browser-Quelltext gesucht und gefunden.

                      Ich werde mir deine Adaption trotzdem ansehen, vielleicht hilft sie weiter. Danke für deine Mühe!

                      Kommentar


                        #12
                        Zitat von Subhash Beitrag anzeigen
                        Ich werde mir deine Adaption trotzdem ansehen, vielleicht hilft sie weiter. Danke für deine Mühe!
                        Nein, das habe ich schon versucht. Es führt (bei mir unter den beschriebenen Umständen) dazu, dass die "empfohlenen Artikel" gar nicht mehr angezeigt werden.

                        Kommentar


                          #13
                          So, jetzt hab' ich's für meinen Fall mit angezeigter Hauptkategorie auf der Startseite, die Unterkategorien besitzt!

                          Die Datei "includes/templates/TEMPLATENAME/templates/tpl_index_categories.php" muss folgendermaßen ausschauen:

                          Code:
                          <?php
                          /**
                           * Page Template
                           *
                           * Loaded by main_page=index<br />
                           * Displays category/sub-category listing<br />
                           * Uses tpl_index_category_row.php to render individual items
                           *
                           * @package templateSystem
                           * @copyright Copyright 2003-2010 Zen Cart Development Team
                           * @copyright Portions Copyright 2003 osCommerce
                           * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
                           * @version $Id: tpl_index_categories.php 4678 2006-10-05 21:02:50Z ajeh $
                           */
                          ?>
                          <!-- erzeugt von includes/templates/template_default/templates/tpl_index_categories.php -->
                          <div class="centerColumn" id="indexCategories">
                          <?php if ($show_welcome == true) { ?>
                          <h1 id="indexCategoriesHeading"><?php echo HEADING_TITLE; ?></h1>
                          
                          <?php if (SHOW_CUSTOMER_GREETING == 1) { ?>
                          <h2 class="greeting"><?php echo zen_customer_greeting(); ?></h2>
                          <?php } ?>
                          
                          <?php if (DEFINE_MAIN_PAGE_STATUS >= 1 and DEFINE_MAIN_PAGE_STATUS <= 2) { ?>
                          <div id="indexCategoriesMainContent" class="content"><?php
                          /**
                           * require the html_define for the index/categories page
                           */
                            include($define_page);
                          ?></div>
                          <?php } ?>
                          
                          <?php } else { ?>
                          <h1 id="indexCategoriesHeading"><?php echo $breadcrumb->last(); ?></h1>
                          <?php } ?>
                          
                          <?php
                          if (PRODUCT_LIST_CATEGORIES_IMAGE_STATUS_TOP == 'true') {
                          // categories_image
                            if ($categories_image = zen_get_categories_image($current_category_id)) {
                          ?>
                          <div id="categoryImgListing" class="categoryImg"><?php echo zen_image(DIR_WS_IMAGES . $categories_image, '', SUBCATEGORY_IMAGE_TOP_WIDTH, SUBCATEGORY_IMAGE_TOP_HEIGHT); ?></div>
                          <?php
                            }
                          } // categories_image
                          ?>
                          
                          <?php
                          // categories_description
                              if ($current_categories_description != '') {
                          ?>
                          <div id="categoryDescription" class="catDescContent"><?php echo $current_categories_description;  ?></div>
                          <?php } // categories_description ?>
                          
                          <?php
                          $show_display_category = $db->Execute(SQL_SHOW_PRODUCT_INFO_CATEGORY);
                          
                          while (!$show_display_category->EOF) {
                            // //  echo 'I found ' . zen_get_module_directory(FILENAME_UPCOMING_PRODUCTS);
                          
                          ?>
                          
                          <?php if ($show_display_category->fields['configuration_key'] == 'SHOW_PRODUCT_INFO_CATEGORY_FEATURED_PRODUCTS') { ?>
                          <?php
                          /**
                           * display the Featured Products Center Box
                           */
                          ?>
                          <?php require($template->get_template_dir('tpl_modules_featured_products.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_featured_products.php'); ?>
                          <?php } ?>
                          
                          <!-- BOF: Display grid of available sub-categories, if any -->
                          <?php
                            if (PRODUCT_LIST_CATEGORY_ROW_STATUS == 0) {
                              // do nothing
                            } else {
                              // display subcategories
                          /**
                           * require the code to display the sub-categories-grid, if any exist
                           */
                             require($template->get_template_dir('tpl_modules_category_row.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_category_row.php');
                            }
                          ?>
                          
                          <?php if ($show_display_category->fields['configuration_key'] == 'SHOW_PRODUCT_INFO_CATEGORY_SPECIALS_PRODUCTS') { ?>
                          <?php
                          /**
                           * display the Special Products Center Box
                           */
                          ?>
                          <?php require($template->get_template_dir('tpl_modules_specials_default.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_specials_default.php'); ?>
                          <?php } ?>
                          
                          <?php if ($show_display_category->fields['configuration_key'] == 'SHOW_PRODUCT_INFO_CATEGORY_NEW_PRODUCTS') { ?>
                          <?php
                          /**
                           * display the New Products Center Box
                           */
                          ?>
                          <?php require($template->get_template_dir('tpl_modules_whats_new.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_whats_new.php'); ?>
                          <?php } ?>
                          
                          <?php if ($show_display_category->fields['configuration_key'] == 'SHOW_PRODUCT_INFO_CATEGORY_UPCOMING') { ?>
                          <?php include(DIR_WS_MODULES . zen_get_module_directory(FILENAME_UPCOMING_PRODUCTS)); ?><?php } ?>
                          
                          <?php
                            $show_display_category->MoveNext();
                          } // End Center Boxes
                          ?>
                          </div>
                          Weiters muss man in der Administration "Konfiguration/Liste Artikelindex" die "Empfohlenen Artikel" vor die neuen und die Sonderangebote reihen.

                          Kommentar

                          Info zu diesem Forenarchiv:
                          Mit Release von 1.5.7 wurde die deutsche Zen Cart Version auf eine reine DIY-Lösung umgestellt.
                          Für einen Support via Forum stehen keine personellen und zeitlichen Ressourcen mehr zur Verfügung.
                          Dieses Supportforum bleibt im Nur-Lesen-Modus als Wissensarchiv noch online verfügbar.
                          PM Funktionalität, Registrierung und Posten neuer Beiträge sind deaktiviert.
                          Zugriff auf Anhänge in den Postings ist auch ohne Registrierung/Einloggen möglich.
                          FAQ und Downloadbereich des Forums wurden in die neue umfangreiche Knowledgebase auf der zen-cart-pro.at Website übernommen.

                          Das Development der deutschen Zen Cart Version geht wie bisher auf Github weiter.
                          Wir werden auch weiterhin neue Versionen bereitstellen und die Onlinedokumentation/Knowledgebase aktualisieren.
                          Fehler in der Software können auf Github als Issues gemeldet werden.
                          Follow us
                          aktuelle version
                          Zen Cart 1.5.7g deutsch
                          vom 12.12.2023
                          [Download]
                          Lädt...
                          X