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: Manufakturers BILD in die produktlisting und newprodukts!

    foxalpha

    • Neu im Forum
    • Beiträge: 42
    • Geschlecht:
    Re: Manufakturers BILD in die produktlisting und newprodukts!
    Antwort #30 am: 24. Juni 2012, 21:50:26
    @Markus,

    ja kenne ich, aber bitte verzeih mir, das ich in diesen Bereichen meist eigene Lösungen habe, welche ich favorisiere ... bin sonst nicht stark im Posten, habe aber heute einen freien Tag um auch mal meine Erfahrung zu teilen.

    Aber trotzdem danke.

    Grüße

    Fox

    foxalpha

    • Neu im Forum
    • Beiträge: 42
    • Geschlecht:
    Re: Manufakturers BILD in die produktlisting und newprodukts!
    Antwort #31 am: 24. Juni 2012, 21:56:18
    nochmal @Markus,

    desweiteren sehe ich gerade das zusätzlich sql Abfragen bei diesem Modifier erzeugt werden, obwohl die Table in der Ursprungsabfrage bereits abgefragt wird... das sind bei einem Aufruf eines Product_listings mit 15 Produkten somit auch 15 zusätzliche Mysql Abfragen, welche sich mit unserer erarbeiteten Methode vermeiden lassen.

    Grüße

    Fox

    talktarif.de

    • Mitglied
    • Beiträge: 154
    • Geschlecht:
    Re: Manufakturers BILD in die produktlisting und newprodukts!
    Antwort #32 am: 24. Juni 2012, 21:59:24
    du meintest wohl new_products.php  :-?

    Code:

    Code: PHP  [Auswählen]
    <?php
    /* -----------------------------------------------------------------------------------------
       $Id: new_products.php 1571 2010-12-10 12:38:05Z dokuman $

       modified eCommerce Shopsoftware - community made shopping
       http://www.modified eCommerce Shopsoftware.org

       Copyright (c) 2010 modified eCommerce Shopsoftware
       -----------------------------------------------------------------------------------------
       based on:
       (c) 2000-2001 The Exchange Project  (earlier name of osCommerce)
       (c) 2002-2003 osCommerce(new_products.php,v 1.33 2003/02/12); www.oscommerce.com
       (c) 2003   nextcommerce (new_products.php,v 1.9 2003/08/17); www.nextcommerce.org
       (c) 2006 xt:Commerce (new_products.php 1292 2005-10-07); www.(( Wir dulden keine kommerziellen Werbelinks - Bitte <a href="index.php?topic=3013.0">Forenregeln</a> beachten! ))

       Released under the GNU General Public License
       -----------------------------------------------------------------------------------------
       Third Party contributions:
       Enable_Disable_Categories 1.3                Autor: Mikel Williams | mikel@ladykatcostumes.com

       Released under the GNU General Public License
       ---------------------------------------------------------------------------------------*/


    $module_smarty = new Smarty;

    $module_smarty->assign('tpl_path', 'templates/'.CURRENT_TEMPLATE.'/');


    //fsk18 lock
    $fsk_lock = '';
    if ($_SESSION['customers_status']['customers_fsk18_display'] == '0') {
      $fsk_lock = ' and p.products_fsk18!=1';
    }

    $group_check = '';
    if (GROUP_CHECK == 'true') {
      $group_check = " and p.group_permission_".$_SESSION['customers_status']['customers_status_id']."=1 ";
    }

    if ((!isset ($new_products_category_id)) || ($new_products_category_id == '0')) {

        $new_products_query = "SELECT * FROM
                             "
    .TABLE_PRODUCTS." p,
                             "
    .TABLE_PRODUCTS_DESCRIPTION." pd
                             WHERE p.products_id = pd.products_id
                             and p.products_startpage = '1'
                             "
    .$group_check."
                             "
    .$fsk_lock."
                             and p.products_status = '1'
                             and pd.language_id = '"
    .(int) $_SESSION['languages_id']."'
                             order by p.products_startpage_sort ASC
                             limit "
    .MAX_DISPLAY_NEW_PRODUCTS;
    } else {

      if (MAX_DISPLAY_NEW_PRODUCTS_DAYS != '0') {
        $date_new_products = date("Y.m.d", mktime(1, 1, 1, date("m"), date("d") - MAX_DISPLAY_NEW_PRODUCTS_DAYS, date("Y")));
        $days = " and p.products_date_added > '".$date_new_products."' ";
      }
      $new_products_query = "SELECT * FROM
                                                    "
    .TABLE_PRODUCTS." p,
                                                    "
    .TABLE_PRODUCTS_DESCRIPTION." pd,
                                                    "
    .TABLE_PRODUCTS_TO_CATEGORIES." p2c,
                                                    "
    .TABLE_CATEGORIES." c,
                                                    "
    .TABLE_MANUFACTURERS." m
                                                    where c.categories_status='1'
                                                    and p.products_id = p2c.products_id and p.products_id=pd.products_id and p.manufacturers_id = m.manufacturers_id
                                                    and p2c.categories_id = c.categories_id
                                                    "
    .$group_check."
                                                    "
    .$fsk_lock."
                                                    and c.parent_id = '"
    .$new_products_category_id."'
                                                    and p.products_status = '1' and pd.language_id = '"
    .(int) $_SESSION['languages_id']."'
                                                    order by p.products_date_added DESC limit "
    .MAX_DISPLAY_NEW_PRODUCTS;
    }
    $row = 0;
    $module_content = array ();

    //BOF - web28 -  Produkte mit gleicher ID nicht doppelt anzeigen
    $pid_array = array();
    $new_products_query = xtDBquery($new_products_query);
    while ($new_products = xtc_db_fetch_array($new_products_query, true)) {
      if (!in_array($new_products['products_id'],$pid_array)) {
        $module_content[] = $product->buildDataArray($new_products);
      }
      $pid_array[] = $new_products['products_id'];
    }
    unset($pid_array);
    //EOF - web28 -  Produkte mit gleicher ID nicht doppelt anzeigen

    if (sizeof($module_content) >= 1) {
      $module_smarty->assign('language', $_SESSION['language']);
      $module_smarty->assign('module_content', $module_content);

      // set cache ID
       if (!CacheCheck()) {
        $module_smarty->caching = 0;
        if ((!isset ($new_products_category_id)) || ($new_products_category_id == '0')) {
          $module = $module_smarty->fetch(CURRENT_TEMPLATE.'/module/new_products_default.html');
        } else {
          $module = $module_smarty->fetch(CURRENT_TEMPLATE.'/module/new_products.html');
        }
      } else {
        $module_smarty->caching = 1;
        $module_smarty->cache_lifetime = CACHE_LIFETIME;
        $module_smarty->cache_modified_check = CACHE_CHECK;
        $cache_id = $new_products_category_id.$_SESSION['language'].$_SESSION['customers_status']['customers_status_name'].$_SESSION['currency'];
        if ((!isset ($new_products_category_id)) || ($new_products_category_id == '0')) {
          $module = $module_smarty->fetch(CURRENT_TEMPLATE.'/module/new_products_default.html', $cache_id);
        } else {
          $module = $module_smarty->fetch(CURRENT_TEMPLATE.'/module/new_products.html', $cache_id);
        }
      }
      $default_smarty->assign('MODULE_new_products', $module);
    }
    ?>

    mfg

    foxalpha

    • Neu im Forum
    • Beiträge: 42
    • Geschlecht:
    Re: Manufakturers BILD in die produktlisting und newprodukts!
    Antwort #33 am: 24. Juni 2012, 22:04:22
    ja ... products_new.php .... (Das Bier)

    ersetze Sie mit folgenden:
    Code: PHP  [Auswählen]
    <?php
        /* -----------------------------------------------------------------------------------------
           $Id: new_products.php 1571 2010-12-10 12:38:05Z dokuman $
         
           modified eCommerce Shopsoftware - community made shopping
           http://www.modified eCommerce Shopsoftware.org
         
           Copyright (c) 2010 modified eCommerce Shopsoftware
           -----------------------------------------------------------------------------------------
           based on:
           (c) 2000-2001 The Exchange Project  (earlier name of osCommerce)
           (c) 2002-2003 osCommerce(new_products.php,v 1.33 2003/02/12); www.oscommerce.com
           (c) 2003   nextcommerce (new_products.php,v 1.9 2003/08/17); www.nextcommerce.org
           (c) 2006 xt:Commerce (new_products.php 1292 2005-10-07); www.(( Wir dulden keine kommerziellen Werbelinks - Bitte Forenregeln beachten! ))
         
           Released under the GNU General Public License
           -----------------------------------------------------------------------------------------
           Third Party contributions:
           Enable_Disable_Categories 1.3                Autor: Mikel Williams | mikel@ladykatcostumes.com
         
           Released under the GNU General Public License
           ---------------------------------------------------------------------------------------*/

         
        $module_smarty = new Smarty;
         
        $module_smarty->assign('tpl_path', 'templates/'.CURRENT_TEMPLATE.'/');
         
         
        //fsk18 lock
        $fsk_lock = '';
        if ($_SESSION['customers_status']['customers_fsk18_display'] == '0') {
          $fsk_lock = ' and p.products_fsk18!=1';
        }
         
        $group_check = '';
        if (GROUP_CHECK == 'true') {
          $group_check = " and p.group_permission_".$_SESSION['customers_status']['customers_status_id']."=1 ";
        }
         
        if ((!isset ($new_products_category_id)) || ($new_products_category_id == '0')) {
         
            $new_products_query = "SELECT * FROM
                                "
    .TABLE_PRODUCTS." p,
                                "
    .TABLE_PRODUCTS_DESCRIPTION." pd,
                                "
    .TABLE_MANUFACTURERS." m
                                WHERE p.products_id = pd.products_id
                                and p.products_startpage = '1'  and p.manufacturers_id = m.manufacturers_id
                                "
    .$group_check."
                                "
    .$fsk_lock."
                                and p.products_status = '1'
                                and pd.language_id = '"
    .(int) $_SESSION['languages_id']."'
                                order by p.products_startpage_sort ASC
                                limit "
    .MAX_DISPLAY_NEW_PRODUCTS;
        } else {
         
          if (MAX_DISPLAY_NEW_PRODUCTS_DAYS != '0') {
            $date_new_products = date("Y.m.d", mktime(1, 1, 1, date("m"), date("d") - MAX_DISPLAY_NEW_PRODUCTS_DAYS, date("Y")));
            $days = " and p.products_date_added > '".$date_new_products."' ";
          }
          $new_products_query = "SELECT * FROM
                                                       "
    .TABLE_PRODUCTS." p,
                                                       "
    .TABLE_PRODUCTS_DESCRIPTION." pd,
                                                       "
    .TABLE_PRODUCTS_TO_CATEGORIES." p2c,
                                                       "
    .TABLE_CATEGORIES." c,
                                                       "
    .TABLE_MANUFACTURERS." m
                                                       where c.categories_status='1'
                                                       and p.products_id = p2c.products_id and p.products_id=pd.products_id and p.manufacturers_id = m.manufacturers_id
                                                       and p2c.categories_id = c.categories_id
                                                       "
    .$group_check."
                                                       "
    .$fsk_lock."
                                                       and c.parent_id = '"
    .$new_products_category_id."'
                                                       and p.products_status = '1' and pd.language_id = '"
    .(int) $_SESSION['languages_id']."'
                                                       order by p.products_date_added DESC limit "
    .MAX_DISPLAY_NEW_PRODUCTS;
        }
        $row = 0;
        $module_content = array ();
         
        //BOF - web28 -  Produkte mit gleicher ID nicht doppelt anzeigen
        $pid_array = array();
        $new_products_query = xtDBquery($new_products_query);
        while ($new_products = xtc_db_fetch_array($new_products_query, true)) {
          if (!in_array($new_products['products_id'],$pid_array)) {
            $module_content[] = $product->buildDataArray($new_products);
          }
          $pid_array[] = $new_products['products_id'];
        }
        unset($pid_array);
        //EOF - web28 -  Produkte mit gleicher ID nicht doppelt anzeigen
         
        if (sizeof($module_content) >= 1) {
          $module_smarty->assign('language', $_SESSION['language']);
          $module_smarty->assign('module_content', $module_content);
         
          // set cache ID
           if (!CacheCheck()) {
            $module_smarty->caching = 0;
            if ((!isset ($new_products_category_id)) || ($new_products_category_id == '0')) {
              $module = $module_smarty->fetch(CURRENT_TEMPLATE.'/module/new_products_default.html');
            } else {
              $module = $module_smarty->fetch(CURRENT_TEMPLATE.'/module/new_products.html');
            }
          } else {
            $module_smarty->caching = 1;
            $module_smarty->cache_lifetime = CACHE_LIFETIME;
            $module_smarty->cache_modified_check = CACHE_CHECK;
            $cache_id = $new_products_category_id.$_SESSION['language'].$_SESSION['customers_status']['customers_status_name'].$_SESSION['currency'];
            if ((!isset ($new_products_category_id)) || ($new_products_category_id == '0')) {
              $module = $module_smarty->fetch(CURRENT_TEMPLATE.'/module/new_products_default.html', $cache_id);
            } else {
              $module = $module_smarty->fetch(CURRENT_TEMPLATE.'/module/new_products.html', $cache_id);
            }
          }
          $default_smarty->assign('MODULE_new_products', $module);
        }
        ?>

    und füge dann in die Templatedatei <DEIN TEMPLATE>/module/new_products_default.html -> wieder den IMG TAG ein wie in der <DEIN TEMPLATE>/module/new_products.html

    Grüße

    FoX

    Markus

    • modified Team
    • Beiträge: 1.396
    • Geschlecht:
    Re: Manufakturers BILD in die produktlisting und newprodukts!
    Antwort #34 am: 24. Juni 2012, 22:07:39
    Hi,

    Kein Problem ... Viele Weg führen nach Rom :-)

    Markus

    foxalpha

    • Neu im Forum
    • Beiträge: 42
    • Geschlecht:
    Re: Manufakturers BILD in die produktlisting und newprodukts!
    Antwort #35 am: 24. Juni 2012, 22:08:35
    wohl wahr Markus

    DANKE

    talktarif.de

    • Mitglied
    • Beiträge: 154
    • Geschlecht:
    Re: Manufakturers BILD in die produktlisting und newprodukts!
    Antwort #36 am: 24. Juni 2012, 22:08:58
    Ganz großen Dank Funktioniert nun alles Suppi  :king:

    foxalpha

    • Neu im Forum
    • Beiträge: 42
    • Geschlecht:
    Re: Manufakturers BILD in die produktlisting und newprodukts!
    Antwort #37 am: 24. Juni 2012, 22:09:41
    Was ist mit der Suche ?

    talktarif.de

    • Mitglied
    • Beiträge: 154
    • Geschlecht:
    Re: Manufakturers BILD in die produktlisting und newprodukts!
    Antwort #38 am: 24. Juni 2012, 22:28:16
    Stimmt hast recht LOL hatte ich vergessen!

    talktarif.de

    • Mitglied
    • Beiträge: 154
    • Geschlecht:
    Re: Manufakturers BILD in die produktlisting und newprodukts!
    Antwort #39 am: 25. Juni 2012, 12:48:02
    So habe die ganzen boxen neu gebaut damit das alles auch passt :-) wenn du Zeit hast kannst du dich ja mal melden wg der Suche danke nochmals an dich sehr Kompetent.  :thx:

    foxalpha

    • Neu im Forum
    • Beiträge: 42
    • Geschlecht:
    Re: Manufakturers BILD in die produktlisting und newprodukts!
    Antwort #40 am: 25. Juni 2012, 21:08:43
    Hi Steffen,

    poste mal bei Gelegenheit deine /advanced_search_result.php dort muss noch eine Änderung für die Suche
    rein. Ich kann dir aber erst morgen die neue Datei posten.

    Grüße

    FoX

    talktarif.de

    • Mitglied
    • Beiträge: 154
    • Geschlecht:
    Re: Manufakturers BILD in die produktlisting und newprodukts!
    Antwort #41 am: 30. Juni 2012, 12:37:34
    Hallo hab deinen Eintrag eben erst gesehen hier die Datei.

    Code: PHP  [Auswählen]


    <?php

    /* -----------------------------------------------------------------------------------------
       $Id: advanced_search_result.php 1141 2005-08-10 11:31:36Z novalis $

       XT-Commerce - community made shopping
       http://www.(( Wir dulden keine kommerziellen Werbelinks - Bitte <a href="index.php?topic=3013.0">Forenregeln</a> beachten! ))

       Copyright (c) 2005 XT-Commerce
       -----------------------------------------------------------------------------------------
       based on:
       (c) 2000-2001 The Exchange Project  (earlier name of osCommerce)
       (c) 2002-2003 osCommerce(advanced_search_result.php,v 1.68 2003/05/14); www.oscommerce.com
       (c) 2003      nextcommerce (advanced_search_result.php,v 1.17 2003/08/21); www.nextcommerce.org

       Released under the GNU General Public License
       ---------------------------------------------------------------------------------------*/


    include ('includes/application_top.php');
    // create smarty elements
    $smarty = new Smarty;
    // include boxes
    require (DIR_FS_CATALOG.'templates/'.CURRENT_TEMPLATE.'/source/boxes.php');
    // include needed functions
    require_once (DIR_FS_INC.'xtc_parse_search_string.inc.php');
    require_once (DIR_FS_INC.'xtc_get_subcategories.inc.php');
    require_once (DIR_FS_INC.'xtc_get_currencies_values.inc.php');

    /*
     * check search entry
     */


    $error = 0; // reset error flag to false
    $errorno = 0;
    $keyerror = 0;

    $_GET['keywords'] = urldecode($_GET['keywords']); // web28 - 2011-03-27 - FIX page search results -> urldecode($_GET['keywords'])

    if (isset ($_GET['keywords']) && empty ($_GET['keywords'])) {
            $keyerror = 1;
    }

    if ((isset ($_GET['keywords']) && empty ($_GET['keywords'])) && (isset ($_GET['pfrom']) && empty ($_GET['pfrom'])) && (isset ($_GET['pto']) && empty ($_GET['pto']))) {
            $errorno += 1;
            $error = 1;
    }
    elseif (isset ($_GET['keywords']) && empty ($_GET['keywords']) && !(isset ($_GET['pfrom'])) && !(isset ($_GET['pto']))) {
            $errorno += 1;
            $error = 1;
    }

    if (strlen($_GET['keywords']) < 3 && strlen($_GET['keywords']) > 0 && $error == 0) {
            $errorno += 1;
            $error = 1;
            $keyerror = 1;
    }

    if (strlen($_GET['pfrom']) > 0) {
            $pfrom_to_check = xtc_db_input($_GET['pfrom']);
            if (!settype($pfrom_to_check, "double")) {
                    $errorno += 10000;
                    $error = 1;
            }
    }

    if (strlen($_GET['pto']) > 0) {
            $pto_to_check = $_GET['pto'];
            if (!settype($pto_to_check, "double")) {
                    $errorno += 100000;
                    $error = 1;
            }
    }

    if (strlen($_GET['pfrom']) > 0 && !(($errorno & 10000) == 10000) && strlen($_GET['pto']) > 0 && !(($errorno & 100000) == 100000)) {
            if ($pfrom_to_check > $pto_to_check) {
                    $errorno += 1000000;
                    $error = 1;
            }
    }

    if (strlen($_GET['keywords']) > 0) {
            if (!xtc_parse_search_string(stripslashes($_GET['keywords']), $search_keywords)) {
                    $errorno += 10000000;
                    $error = 1;
                    $keyerror = 1;
            }
    }

    if ($error == 1 && $keyerror != 1) {

            xtc_redirect(xtc_href_link(FILENAME_ADVANCED_SEARCH, 'errorno='.$errorno.'&'.xtc_get_all_get_params(array ('x', 'y'))));

    } else {

            /*
             *    search process starts here
             */


            $breadcrumb->add(NAVBAR_TITLE1_ADVANCED_SEARCH, xtc_href_link(FILENAME_ADVANCED_SEARCH));
            $breadcrumb->add(NAVBAR_TITLE2_ADVANCED_SEARCH, xtc_href_link(FILENAME_ADVANCED_SEARCH_RESULT, 'keywords='.htmlspecialchars(xtc_db_input($_GET['keywords'])) .'&search_in_description='.xtc_db_input($_GET['search_in_description']).'&categories_id='.(int)$_GET['categories_id'].'&inc_subcat='.xtc_db_input($_GET['inc_subcat']).'&manufacturers_id='.(int)$_GET['manufacturers_id'].'&pfrom='.xtc_db_input($_GET['pfrom']).'&pto='.xtc_db_input($_GET['pto']).'&dfrom='.xtc_db_input($_GET['dfrom']).'&dto='.xtc_db_input($_GET['dto'])));

            require (DIR_WS_INCLUDES.'header.php');

            // define additional filters //

            //fsk18 lock
            if ($_SESSION['customers_status']['customers_fsk18_display'] == '0') {
                    $fsk_lock = " AND p.products_fsk18 != '1' ";
            } else {
                    unset ($fsk_lock);
            }

            //group check
            if (GROUP_CHECK == 'true') {
                    $group_check = " AND p.group_permission_".$_SESSION['customers_status']['customers_status_id']."=1 ";
            } else {
                    unset ($group_check);
            }

            //manufacturers if set
            if (isset ($_GET['manufacturers_id']) && xtc_not_null($_GET['manufacturers_id'])) {
                    $manu_check = " AND p.manufacturers_id = '".(int)$_GET['manufacturers_id']."' ";
            }

            //include subcategories if needed
            if (isset ($_GET['categories_id']) && xtc_not_null($_GET['categories_id'])) {
                    if ($_GET['inc_subcat'] == '1') {
                            $subcategories_array = array ();
                            xtc_get_subcategories($subcategories_array, (int)$_GET['categories_id']);
                            $subcat_join = " LEFT OUTER JOIN ".TABLE_PRODUCTS_TO_CATEGORIES." AS p2c ON (p.products_id = p2c.products_id) ";
                            $subcat_where = " AND p2c.categories_id IN ('".(int) $_GET['categories_id']."' ";
                            foreach ($subcategories_array AS $scat) {
                                    $subcat_where .= ", '".$scat."'";
                            }
                            $subcat_where .= ") ";
                    } else {
                            $subcat_join = " LEFT OUTER JOIN ".TABLE_PRODUCTS_TO_CATEGORIES." AS p2c ON (p.products_id = p2c.products_id) ";
                            $subcat_where = " AND p2c.categories_id = '".(int) $_GET['categories_id']."' ";
                    }
            }

            if ($_GET['pfrom'] || $_GET['pto']) {
                    $rate = xtc_get_currencies_values($_SESSION['currency']);
                    $rate = $rate['value'];
                    if ($rate && $_GET['pfrom'] != '') {
                            $pfrom = $_GET['pfrom'] / $rate;
                    }
                    if ($rate && $_GET['pto'] != '') {
                            $pto = $_GET['pto'] / $rate;
                    }
            }

            //price filters
            if (($pfrom != '') && (is_numeric($pfrom))) {
                    $pfrom_check = " AND (IF(s.status = '1' AND p.products_id = s.products_id, s.specials_new_products_price, p.products_price) >= ".$pfrom.") ";
            } else {
                    unset ($pfrom_check);
            }

            if (($pto != '') && (is_numeric($pto))) {
                    $pto_check = " AND (IF(s.status = '1' AND p.products_id = s.products_id, s.specials_new_products_price, p.products_price) <= ".$pto." ) ";
            } else {
                    unset ($pto_check);
            }

            //build query
            //BOF - Hetfield - 2009-08-11 - BUGFIX: vpe in advanced_search_result
            $select_str = "SELECT distinct
                              p.products_id,
                              p.products_price,
                              p.products_model,
                              p.products_quantity,
                              p.products_shippingtime,
                              p.products_fsk18,
                              p.products_image,
                              p.products_weight,
                              p.products_tax_class_id,
                                              p.products_vpe,
                                              p.products_vpe_status,
                                              p.products_vpe_value,
                              pd.products_name,
                              pd.products_short_description,
                              pd.products_description "
    ;
            //EOF - Hetfield - 2009-08-11 - BUGFIX: vpe in advanced_search_result
            $from_str  = "FROM ".TABLE_PRODUCTS." AS p LEFT JOIN ".TABLE_PRODUCTS_DESCRIPTION." AS pd ON (p.products_id = pd.products_id) ";
            $from_str .= $subcat_join;
            if (SEARCH_IN_ATTR == 'true') { $from_str .= " LEFT OUTER JOIN ".TABLE_PRODUCTS_ATTRIBUTES." AS pa ON (p.products_id = pa.products_id) LEFT OUTER JOIN ".TABLE_PRODUCTS_OPTIONS_VALUES." AS pov ON (pa.options_values_id = pov.products_options_values_id) "; }
            $from_str .= "LEFT OUTER JOIN ".TABLE_SPECIALS." AS s ON (p.products_id = s.products_id) AND s.status = '1'";

            if ((DISPLAY_PRICE_WITH_TAX == 'true') && ((isset ($_GET['pfrom']) && xtc_not_null($_GET['pfrom'])) || (isset ($_GET['pto']) && xtc_not_null($_GET['pto'])))) {
                    if (!isset ($_SESSION['customer_country_id'])) {
                            $_SESSION['customer_country_id'] = STORE_COUNTRY;
                            $_SESSION['customer_zone_id'] = STORE_ZONE;
                    }
                    $from_str .= " LEFT OUTER JOIN ".TABLE_TAX_RATES." tr ON (p.products_tax_class_id = tr.tax_class_id) LEFT OUTER JOIN ".TABLE_ZONES_TO_GEO_ZONES." gz ON (tr.tax_zone_id = gz.geo_zone_id) ";
                    $tax_where = " AND (gz.zone_country_id IS NULL OR gz.zone_country_id = '0' OR gz.zone_country_id = '".(int) $_SESSION['customer_country_id']."') AND (gz.zone_id is null OR gz.zone_id = '0' OR gz.zone_id = '".(int) $_SESSION['customer_zone_id']."')";
            } else {
                    unset ($tax_where);
            }

            //where-string
            $where_str = " WHERE p.products_status = '1' "." AND pd.language_id = '".(int) $_SESSION['languages_id']."'".$subcat_where.$fsk_lock.$manu_check.$group_check.$tax_where.$pfrom_check.$pto_check;

            //go for keywords... this is the main search process
            if (isset ($_GET['keywords']) && xtc_not_null($_GET['keywords'])) {
                    if (xtc_parse_search_string(stripslashes($_GET['keywords']), $search_keywords)) {
                            $where_str .= " AND ( ";
                            for ($i = 0, $n = sizeof($search_keywords); $i < $n; $i ++) {
                                    switch ($search_keywords[$i]) {
                                            case '(' :
                                            case ')' :
                                            case 'and' :
                                            case 'or' :
                                                    $where_str .= " ".$search_keywords[$i]." ";
                                                    break;
                                            default :
                                            // BOF - Dokuman - 2009-05-27 - search for umlaut letters
                                            //see http://www.gunnart.de/tipps-und-tricks/xtcommerce-suche-nach-umlauten/
                                            /*
                                                    $where_str .= " ( ";
                                                    $where_str .= "pd.products_keywords LIKE ('%".addslashes($search_keywords[$i])."%') ";
                                                    if (SEARCH_IN_DESC == 'true') {
                                                       $where_str .= "OR pd.products_description LIKE ('%".addslashes($search_keywords[$i])."%') ";
                                                       $where_str .= "OR pd.products_short_description LIKE ('%".addslashes($search_keywords[$i])."%') ";
                                                    }                                              
                                                    $where_str .= "OR pd.products_name LIKE ('%".addslashes($search_keywords[$i])."%') ";
                                                    $where_str .= "OR p.products_model LIKE ('%".addslashes($search_keywords[$i])."%') ";
                                                    if (SEARCH_IN_ATTR == 'true') {
                                                       $where_str .= "OR (pov.products_options_values_name LIKE ('%".addslashes($search_keywords[$i])."%') ";
                                                       $where_str .= "AND pov.language_id = '".(int) $_SESSION['languages_id']."')";
                                                    }
                                            */

                                           
                                            // Wurde nach Umlauten gesucht?
              $ent_keyword = htmlentities($search_keywords[$i]);
              $ent_keyword = ($ent_keyword != $search_keywords[$i]) ? addslashes($ent_keyword) : false;

              // addslashes langt einmal ...
              $keyword = addslashes($search_keywords[$i]);

              $where_str .= " ( ";
              $where_str .= "pd.products_keywords LIKE ('%".$keyword."%') ";
              $where_str .= ($ent_keyword) ? "OR pd.products_keywords LIKE ('%".$ent_keyword."%') " : '';
              if (SEARCH_IN_DESC == 'true') {
                 $where_str .= "OR pd.products_description LIKE ('%".$keyword."%') ";
                 $where_str .= ($ent_keyword) ? "OR pd.products_description LIKE ('%".$ent_keyword."%') " : '';
                 $where_str .= "OR pd.products_short_description LIKE ('%".$keyword."%') ";
                 $where_str .= ($ent_keyword) ? "OR pd.products_short_description LIKE ('%".$ent_keyword."%') " : '';
              }
              $where_str .= "OR pd.products_name LIKE ('%".$keyword."%') ";
              $where_str .= ($ent_keyword) ? "OR pd.products_name LIKE ('%".$ent_keyword."%') " : '';
              $where_str .= "OR p.products_model LIKE ('%".$keyword."%') ";
              $where_str .= ($ent_keyword) ? "OR p.products_model LIKE ('%".$ent_keyword."%') " : '';
              if (SEARCH_IN_ATTR == 'true') {
                 $where_str .= "OR (pov.products_options_values_name LIKE ('%".$keyword."%') ";
                 $where_str .= ($ent_keyword) ? "OR pov.products_options_values_name LIKE ('%".$ent_keyword."%') " : '';
                 $where_str .= "AND pov.language_id = '".(int) $_SESSION['languages_id']."')";
              }
                                            // EOF - Dokuman - 2009-05-27 - search for umlaut letters

                                                    $where_str .= " ) ";
                                                    break;
                                    }
                            }
                            $where_str .= " ) GROUP BY p.products_id ORDER BY p.products_id ";
                    }
            }

            //glue together
            $listing_sql = $select_str.$from_str.$where_str;
            require (DIR_WS_MODULES.FILENAME_PRODUCT_LISTING);
    }
    $smarty->assign('language', $_SESSION['language']);
    $smarty->caching = 0;
    if (!defined(RM))
            $smarty->load_filter('output', 'note');
    $smarty->display(CURRENT_TEMPLATE.'/index.html');
    include ('includes/application_bottom.php');
    ?>


     

    lg steffen
    7 Antworten
    5330 Aufrufe
    11. Februar 2013, 21:44:02 von lullifatz
    3 Antworten
    2523 Aufrufe
    22. Juni 2016, 11:40:03 von Bonsai
    14 Antworten
    9207 Aufrufe
    20. Oktober 2011, 17:35:10 von Tomcraft
    0 Antworten
    1726 Aufrufe
    12. Februar 2018, 20:31:19 von -Tomka-
               
    anything