Seite 1 von 2 12 LetzteLetzte
Ergebnis 1 bis 10 von 16

Thema: RSS Feed Problem mit MySQL 5.7

  1. #1
    Padawan Stufe VI Avatar von bumerang24
    Registriert seit
    25.11.2011
    Ort
    München
    Beiträge
    759
    Themen
    122
    DANKE
    46
    Erhaltene Danke: 57

    Standard RSS Feed Problem mit MySQL 5.7

    Hallo zusammen,

    kann mir wer bei den Logfiles helfen?
    Ich werde mal wieder nicht schlau daraus. Ist erst gekommen nach meinen Providerwechsel.
    PHP-Code:
    [02-Aug-2017 20:24:28 Europe/BerlinRequest URI: /, IP address66.249.79.27
    #1  zen_categories_ul_generator->buildBranch() called at [/XXX/XXX/ZC_SHOP_155/includes/classes/categories_ul_generator.php:73]
    #2  zen_categories_ul_generator->buildTree() called at [/XXX/XXX/ZC_SHOP_155/includes/templates/responsive_classic/templates/tpl_modules_mobile_menu.php:38]
    #3  require(/home/www/ZC_SHOP_155/includes/templates/responsive_classic/templates/tpl_modules_mobile_menu.php) called at [/XXX/XXX/ZC_SHOP_155/includes/templates/responsive_classic/common/tpl_main_page.php:264]
    #4  require(/home/www/ZC_SHOP_155/includes/templates/responsive_classic/common/tpl_main_page.php) called at [/XXX/XXX/ZC_SHOP_155/index.php:97]

    [02-Aug-2017 20:24:28 Europe/BerlinPHP Warning:  A non-numeric value encountered in /XXXX/XXX/ZC_SHOP_155/includes/classes/categories_ul_generator.php on line 46
    [02-Aug-2017 20:24:28 Europe/BerlinRequest URI: /, IP address66.249.79.27
    #1  zen_categories_ul_generator->buildBranch() called at [/XXX/XXX/ZC_SHOP_155/includes/classes/categories_ul_generator.php:73]
    #2  zen_categories_ul_generator->buildTree() called at [/XXX/XXX/ZC_SHOP_155/ZC_SHOP_155/includes/templates/responsive_classic/templates/tpl_modules_mobile_menu.php:38]
    #3  require(/home/www/ZC_SHOP_155/includes/templates/responsive_classic/templates/tpl_modules_mobile_menu.php) called at [/XXX/XXX/ZC_SHOP_155/ZC_SHOP_155/includes/templates/responsive_classic/common/tpl_main_page.php:264]
    #4  require(/home/www/ZC_SHOP_155/includes/templates/responsive_classic/common/tpl_main_page.php) called at [/XXX/XXX/ZC_SHOP_155/ZC_SHOP_155/index.php:97]

    [02-Aug-2017 20:24:28 Europe/BerlinPHP Warning:  A non-numeric value encountered in /XXX/XXX/ZC_SHOP_155/includes/classes/categories_ul_generator.php on line 61
    [02-Aug-2017 20:24:28 Europe/BerlinRequest URI: /, IP address66.249.79.27
    #1  zen_categories_ul_generator->buildBranch() called at [/XXX/XXX/ZC_SHOP_155/ZC_SHOP_155/includes/classes/categories_ul_generator.php:73]
    #2  zen_categories_ul_generator->buildTree() called at [/XXX/XXX/ZC_SHOP_155/ZC_SHOP_155/includes/templates/responsive_classic/templates/tpl_modules_mobile_menu.php:38]
    #3  require(/home/www/ZC_SHOP_155/includes/templates/responsive_classic/templates/tpl_modules_mobile_menu.php) called at [/XXX/XXX/ZC_SHOP_155/ZC_SHOP_155/includes/templates/responsive_classic/common/tpl_main_page.php:264]
    #4  require(/home/www/ZC_SHOP_155/includes/templates/responsive_classic/common/tpl_main_page.php) called at [/XXX/XXX/ZC_SHOP_155/ZC_SHOP_155/index.php:97] 
    Der Log wiederholt sich ständig im Stunden Takt.

    Danke schon mal für eine Info

    Guido
    Geändert von bumerang24 (03.08.2017 um 16:37 Uhr)

  2. #2
    Jedi-Ritter Avatar von webchills
    Registriert seit
    30.10.2004
    Ort
    Österreich
    Beiträge
    6.903
    Themen
    92
    DANKE
    3
    Erhaltene Danke: 1.203

    Standard

    Du scheinst PHP 7.1 zu verwenden. Mit 7.1. ist mit solchen Errors zu rechnen, da es nach der Release von 1.5.5 erschienen ist.
    Stelle wenn möglich auf PHP 7.0.x um.
    !!! kostenloser Support ausschließlich im Forum - Nicht per Email, nicht per Telefon und nicht per PM !!!

  3. #3
    Padawan Stufe VI Avatar von bumerang24
    Registriert seit
    25.11.2011
    Ort
    München
    Beiträge
    759
    Themen
    122
    DANKE
    46
    Erhaltene Danke: 57
    Erstellt von

    Standard

    Richtig, habe gerade umgestellt auf 7.0
    Danke dir erst mal

  4. #4
    Padawan Stufe VI Avatar von bumerang24
    Registriert seit
    25.11.2011
    Ort
    München
    Beiträge
    759
    Themen
    122
    DANKE
    46
    Erhaltene Danke: 57
    Erstellt von

    Standard

    Der eine Log ist weg, der nächste ist da, im Minutentakt...


    PHP-Code:
    [04-Aug-2017 04:22:00 Europe/BerlinRequest URI:  /index.php?main_page=rss_feed&feed=products&products_id=120IP  address66.249.79.25
    #1  trigger_error() called at [/home/www/ZC_SHOP_155/includes/classes/db/mysql/query_factory.php:167]
    #2  queryFactory->show_error() called at [/home/www/ZC_SHOP_155/includes/classes/db/mysql/query_factory.php:139]
    #3  queryFactory->set_error() called at [/home/www/ZC_SHOP_155/includes/classes/db/mysql/query_factory.php:266]
    #4  queryFactory->Execute() called at [/home/www/ZC_SHOP_155/includes/modules/pages/rss_feed/header_php.php:375]
    #5  zen_rss_products() called at [/home/www/ZC_SHOP_155/includes/modules/pages/rss_feed/header_php.php:360]
    #6  require(/home/www/ZC_SHOP_155/includes/modules/pages/rss_feed/header_php.php) called at [/home/www/ZC_SHOP_155/index.php:36]

    [04-Aug-2017 04:22:00 Europe/BerlinPHP Fatal error:  3065:Expression  #2 of ORDER BY clause is not in SELECT list, references column  'web105_db3.p.products_sort_order' which is not in SELECT list; this is  incompatible with DISTINCT :: SELECT DISTINCT p.products_id,  pd.products_name, pd.products_description, p.products_image,  p.products_date_added, p.products_last_modified, p.master_categories_id,  p.products_price_sorter AS price, p.products_tax_class_id,  p.products_quantity, p.products_model, p.products_weight,  p.manufacturers_id, m.manufacturers_name, r.reviews_rating
                           
    FROM ZC155_products p
                             LEFT JOIN ZC155_products_description pd ON 
    (p.products_id pd.products_id)
                             
    LEFT JOIN ZC155_manufacturers m ON (p.manufacturers_id m.manufacturers_id)
                             
    LEFT JOIN ZC155_reviews r ON (p.products_id r.products_id)
                             , 
    ZC155_products_to_categories p2cZC155_categories c 
                           WHERE pd
    .language_id 43
                             
    AND p.products_status 1
                             
    AND p.products_id p2c.products_id
                          
    AND c.categories_id 20
                          
    AND p2c.categories_id 20 
                             
                              
    AND p.products_id=120
                              ORDER BY p
    .products_last_modified DESCp.products_sort_order
                              LIMIT 1 
    ==> (as called by)  /XXX/XXX/ZC_SHOP_155/includes/modules/pages/rss_feed/header_php.php on  line 375 <== in  /XXX/XXX/ZC_SHOP_155/includes/classes/db/mysql/query_factory.php on  line 167 
    Grüße

    Guido
    Geändert von bumerang24 (04.08.2017 um 09:16 Uhr)

  5. #5
    Padawan Stufe VI Avatar von bumerang24
    Registriert seit
    25.11.2011
    Ort
    München
    Beiträge
    759
    Themen
    122
    DANKE
    46
    Erhaltene Danke: 57
    Erstellt von

    Standard Und noch ein Log vom RSS

    Hallo zusammen, der neuste Log Eintrag ist jetzt folgender...
    Liegt wahrscheinlich wieder an der Person vorn PC, trotzdem bräuchte ich Hilfe.

    HTML-Code:
    [05-Aug-2017 16:08:29 Europe/Berlin] Request URI:  /index.php?main_page=rss_feed&feed=products&products_id=151, IP  address: 66.249.66.145
    #1  trigger_error() called at [/XXX/XXX/ZC_SHOP_155/includes/classes/db/mysql/query_factory.php:167]
    #2  queryFactory->show_error() called at [/XXX/XXX/ZC_SHOP_1555/includes/classes/db/mysql/query_factory.php:139]
    #3  queryFactory->set_error() called at[/XXX/XXX/ZC_SHOP_155/includes/classes/db/mysql/query_factory.php:266]
    #4  queryFactory->Execute() called at [/XXX/XXX/ZC_SHOP_155/includes/modules/pages/rss_feed/header_php.php:375]
    #5  zen_rss_products() called at [/XXX/XXX/ZC_SHOP_155/includes/modules/pages/rss_feed/header_php.php:360]
    #6  require(/XXX/XXX/ZC_SHOP_155/includes/modules/pages/rss_feed/header_php.php) called at [/home/www/ZC_SHOP_155/index.php:36]
    
    [05-Aug-2017 16:08:29 Europe/Berlin] PHP Fatal error:  3065:Expression  #2 of ORDER BY clause is not in SELECT list, references column  'web105_db3.p.products_sort_order' which is not in SELECT list; this is  incompatible with DISTINCT :: SELECT DISTINCT p.products_id,  pd.products_name, pd.products_description, p.products_image,  p.products_date_added, p.products_last_modified, p.master_categories_id,  p.products_price_sorter AS price, p.products_tax_class_id,  p.products_quantity, p.products_model, p.products_weight,  p.manufacturers_id, m.manufacturers_name, r.reviews_rating
                           FROM ZC155_products p
                             LEFT JOIN ZC155_products_description pd ON (p.products_id = pd.products_id)
                             LEFT JOIN ZC155_manufacturers m ON (p.manufacturers_id = m.manufacturers_id)
                             LEFT JOIN ZC155_reviews r ON (p.products_id = r.products_id)
                             , ZC155_products_to_categories p2c, ZC155_categories c 
                           WHERE pd.language_id = 43
                             AND p.products_status = 1
                             AND p.products_id = p2c.products_id
                          AND c.categories_id = 25
                          AND p2c.categories_id = 25 
                             
                              AND p.products_id=151
                              ORDER BY p.products_last_modified DESC, p.products_sort_order
                              LIMIT 1 ==> (as called by)  /XXX/XXX/ZC_SHOP_155/includes/modules/pages/rss_feed/header_php.php on  line 375 <== in  /home/www/ZC_SHOP_155/includes/classes/db/mysql/query_factory.php on  line 167

    Danke schon mal

    Grüße

    Guido

  6. #6
    Jedi-Ritter Avatar von webchills
    Registriert seit
    30.10.2004
    Ort
    Österreich
    Beiträge
    6.903
    Themen
    92
    DANKE
    3
    Erhaltene Danke: 1.203

    Standard

    Welche MySQL Version wird hier genau verwendet? Ist das MySQL 5.7.5? Ändere mal in includes/modules/pages/rss_feed/header_php.php ca. Zeile 345 von
    Code:
    if(!isset($order_by)) $order_by = " ORDER BY p.products_last_modified DESC, p.products_sort_order";       if(!isset($where_days)) $where_days = '';     $sql_products = "SELECT DISTINCT p.products_id, pd.products_name, pd.products_description, p.products_image, p.products_date_added, p.products_last_modified, p.master_categories_id, p.products_price_sorter AS price, p.products_tax_class_id, p.products_quantity, p.products_model, p.products_weight, p.manufacturers_id, m.manufacturers_name, r.reviews_rating
    auf
    Code:
     if(!isset($order_by)) $order_by = " ORDER BY p.products_last_modified DESC, p.products_sort_order";       if(!isset($where_days)) $where_days = '';   $sql_products = "SELECT DISTINCT p.products_sort_order, p.products_id, pd.products_name, pd.products_description, p.products_image, p.products_date_added, p.products_last_modified, p.master_categories_id, p.products_price_sorter AS price, p.products_tax_class_id, p.products_quantity, p.products_model, p.products_weight, p.manufacturers_id, m.manufacturers_name, r.reviews_rating
    Geändert von webchills (08.08.2017 um 12:10 Uhr)
    !!! kostenloser Support ausschließlich im Forum - Nicht per Email, nicht per Telefon und nicht per PM !!!

  7. Folgender User sagt Danke zu webchills für den nützlichen Beitrag:

    bumerang24 (08.08.2017)

  8. #7
    Padawan Stufe VI Avatar von bumerang24
    Registriert seit
    25.11.2011
    Ort
    München
    Beiträge
    759
    Themen
    122
    DANKE
    46
    Erhaltene Danke: 57
    Erstellt von

    Standard

    Danke Webchills,

    ich habe mal die Datei geändert.

    Die DB Daten:
    Datenbank: MySQL 5.7.16-log
    Datenbank Datum: 08.08.2017 12:43:19

    MySQL Slow Query Log Status: On
    MySQL Slow Query Log File: /var/log/mysql/mysql-slow.log

    Ich schau mal ob die Logs ausbleiben.

  9. #8
    Padawan Stufe VI Avatar von bumerang24
    Registriert seit
    25.11.2011
    Ort
    München
    Beiträge
    759
    Themen
    122
    DANKE
    46
    Erhaltene Danke: 57
    Erstellt von

    Standard

    Hallo Webchills,

    jetzt kommt folgender Log zum Vorschein:
    Code:
    [08-Aug-2017 19:38:17 Europe/Berlin] PHP Parse error:  syntax error,  unexpected 'SELECT' (T_STRING) in  /XXX/XXX/ZC_SHOP_155/includes/modules/pages/rss_feed/header_php.php on  line 347

    Der Eintrag bei mir im Shop Zeile 347:

    Code:
     $sql_products = "SELECT DISTINCT p.products_id, pd.products_name, pd.products_description, p.products_image, p.products_date_added, p.products_last_modified, p.master_categories_id, p.products_price_sorter AS price, p.products_tax_class_id, p.products_quantity, p.products_model, p.products_weight, p.manufacturers_id, m.manufacturers_name, r.reviews_rating
    Kannst du noch mal schauen bitte?

    Danke und Grüße

    Guido

  10. #9
    Jedi-Ritter Avatar von webchills
    Registriert seit
    30.10.2004
    Ort
    Österreich
    Beiträge
    6.903
    Themen
    92
    DANKE
    3
    Erhaltene Danke: 1.203

    Standard

    Du hast beim Ändern irgendwas vorher oder nachher rausgelöscht, es ist wohl einfacher, wenn Du die Datei komplett übernimmst, hier der gesamte Inhalt:
    Code:
    <?php/**
     * rss_feed header_php.php
     *
     * @package rss feed
     * @copyright Copyright 2004-2008 Andrew Berezin eCommerce-Service.com
     * @copyright Portions Copyright 2003-2016 Zen Cart Development Team
     * @copyright Portions Copyright 2003 osCommerce
     * @license http://www.zen-cart-pro.at/license/2_0.txt GNU Public License V2.0
     * @version $Id: header_php.php, 2017-08-08 22:23:04 webchills $
     */
    //  @ini_set('display_errors', '1');
    //  error_reporting(E_ALL);
    
    
    @define('RSS_UTM_ACTIVE', 'true');
    @define('RSS_UTM_SOURCE', 'rss');
    @define('RSS_UTM_MEDIUM', 'rssfeed');
    @define('RSS_UTM_TERM', '');
    @define('RSS_UTM_CONTENT', '');
    @define('RSS_UTM_CAMPAIGN', '');
    
    
    @define('RSS_BUYNOW_LINK', 'false');
    @define('RSS_DEFAULT_IMAGE_SIZE', 'small'); // \'small\', \'medium\', \'large\'
    @define('RSS_CACHE_TIME', '10');
    
    
    @define('DIR_FS_RSSFEED_CACHE', DIR_FS_SQL_CACHE . '/rss');
    @define('RSS_ERROR_CACHE_DIR', 'Cache directory not found "' . DIR_FS_RSSFEED_CACHE . '"');
    
    
    
    
    require_once(DIR_WS_CLASSES . 'rss_feed.php');
    
    
    $rss = new rss_feed();
    
    
    if(RSS_CACHE_TIME > 0) {
        $rss->rssFeedCacheSet(true);
    } else {
        $rss->rssFeedCacheSet(false);
    }
    
    
      $rss->rss_feed_encoding(CHARSET);
      $rss->rss_feed_content_type('text/xml'); // 'application/rss+xml'
      $rss->rss_feed_set('ttl', RSS_TTL);
    
    
    if(!$rss->rss_feed_cache($_SERVER['QUERY_STRING'], RSS_CACHE_TIME*60)) {
    
    
      
      $rss->rss_feed_xmlns('xmlns:g="http://base.google.com/ns/1.0"');
      $rss->rss_feed_xmlns('xmlns:c="http://base.google.com/cns/1.0"');
    
    
     
    
    
      $directory_array = array();
      $tpl_dir = $template->get_template_dir('rss(.*)\.css', DIR_WS_TEMPLATE, $current_page_base, 'css');
      $directory_array = $template->get_template_part($tpl_dir ,'/^rss/', '.css');
      foreach ($directory_array as $value) {
        $rss->rss_feed_style(HTTP_SERVER . DIR_WS_CATALOG . $tpl_dir . '/' . $value);
      }
      $tpl_dir = $template->get_template_dir('rss(.*)\.xsl', DIR_WS_TEMPLATE, $current_page_base, 'css');
      $directory_array = $template->get_template_part($tpl_dir ,'/^rss/', '.xsl');
      foreach ($directory_array as $value) {
        $rss->rss_feed_style(HTTP_SERVER . DIR_WS_CATALOG . $tpl_dir . '/' . $value);
      }
    
    
      if (is_file($template->get_template_dir(RSS_IMAGE, DIR_WS_TEMPLATE, $current_page_base, 'images') . '/' . RSS_IMAGE)) {
        $image = zen_href_link($template->get_template_dir(RSS_IMAGE, DIR_WS_TEMPLATE, $current_page_base, 'images') . '/' . RSS_IMAGE, '', 'NONSSL', false, true, true);
      } elseif (is_file(DIR_FS_CATALOG . DIR_WS_IMAGES . RSS_IMAGE)) {
        $image = HTTP_SERVER . DIR_WS_CATALOG . DIR_WS_IMAGES . RSS_IMAGE;
      } else {
        $image = false;
      }
      $rss->rss_feed_image((RSS_IMAGE_NAME == '' ? STORE_NAME : RSS_IMAGE_NAME), HTTP_SERVER . DIR_WS_CATALOG, $image);
    
    
      $rss_title = (RSS_TITLE == '' ? STORE_NAME : RSS_TITLE);
      $rss_title .= RSS_TITLE_DELIMITER . rss_feed_title();
    
    
      $rss->rss_feed_description_set(RSS_ITEMS_DESCRIPTION, RSS_ITEMS_DESCRIPTION_MAX_LENGTH);
      $rss->rss_feed_set('title', $rss_title);
      $rss->rss_feed_set('link', HTTP_SERVER . DIR_WS_CATALOG);
      $rss->rss_feed_set('description', RSS_DESCRIPTION);
      $rss->rss_feed_set('lastBuildDate', date('r'));
      $rss->rss_feed_set('generator', 'Zen-Cart v. ' . RSS_FEED_VERSION . ' RSS 2.0 Feed');
      $rss->rss_feed_set('copyright', 'Copyright &copy; ' . date('Y') . ' ' . (RSS_COPYRIGHT == ''? STORE_OWNER : RSS_COPYRIGHT));
      $rss->rss_feed_set('managingEditor', (RSS_MANAGING_EDITOR == ''? STORE_OWNER_EMAIL_ADDRESS . " (" . STORE_OWNER . ")" : RSS_MANAGING_EDITOR));
      $rss->rss_feed_set('webMaster', (RSS_WEBMASTER == ''? STORE_OWNER_EMAIL_ADDRESS . " (" . STORE_OWNER . ")" : RSS_WEBMASTER));
      $rss->rss_feed_set('language', $_SESSION["languages_code"]);
    
    
      $additionalURL = '';
      if($_SESSION["languages_code"] != DEFAULT_LANGUAGE) {
        $additionalURL .= '&language=' . $_SESSION["languages_code"];
      }
      if(isset($_GET["ref"])) {
        $additionalURL .= '&ref=' . $_GET["ref"];
      }
      if(isset($_GET["utm_source"]) && isset($_GET["utm_medium"])) {
        $additionalURL .= '&utm_source=' . $_GET["utm_source"] . '&utm_medium=' . $_GET["utm_medium"];
        if($_GET["utm_term"] != '') $additionalURL .= '&utm_term=' . $_GET["utm_term"];
        if($_GET["utm_content"] != '') $additionalURL .= '&utm_content=' . $_GET["utm_content"];
        if($_GET["utm_campaign"] != '') $additionalURL .= '&utm_campaign=' . $_GET["utm_campaign"];
      } elseif (RSS_UTM_ACTIVE == 'true' && RSS_UTM_SOURCE != '' && RSS_UTM_MEDIUM != '') {
        $additionalURL .= '&utm_source=' . RSS_UTM_SOURCE . '&utm_medium=' . RSS_UTM_MEDIUM;
        if(RSS_UTM_TERM != '') $additionalURL .= '&utm_term=' . RSS_UTM_TERM;
        if(RSS_UTM_CONTENT != '') $additionalURL .= '&utm_content=' . RSS_UTM_CONTENT;
        if(RSS_UTM_CAMPAIGN != '') $additionalURL .= '&utm_campaign=' . RSS_UTM_CAMPAIGN;
      }
    
    
      $random = false;
    
    
      if(isset($_GET['products_id'])) $_GET['products_id'] = (int)$_GET['products_id'];
    
    
      $limit = "";
      if(isset($_GET['limit'])) {
        if((int)$_GET['limit'] > 0) {
          $limit = " LIMIT " . (int)$_GET['limit'];
        }
      } elseif ((int)RSS_PRODUCTS_LIMIT > 0) {
        $limit = " LIMIT " . (int)RSS_PRODUCTS_LIMIT;
      }
    
    
      switch($_GET["feed"]) {
    
    
    
    
    
    
        case "news":
          require_once(DIR_WS_FUNCTIONS . 'news.php');
          $date_selector = $db->Execute("SELECT news_date_published
                                         FROM " . TABLE_NEWS_ARTICLES . "
                                         WHERE news_status = '1'
                                           AND to_days(news_date_published) <= to_days(now())
                                         GROUP BY news_date_published DESC
                                         LIMIT " . (int)NEWS_RSS_FEED_NUMBER_OF_DAYS);
          while (!$date_selector->EOF) {
            $article = $db->Execute("SELECT n.article_id, na.author_name, na.author_email, nt.news_article_name, nt.news_article_text, nt.news_article_shorttext, n.news_image, nt.news_image_text, n.news_date_published
                                     FROM " . TABLE_NEWS_ARTICLES . " n
                                       LEFT JOIN " . TABLE_NEWS_ARTICLES_TEXT . " nt ON (n.article_id = nt.article_id AND nt.language_id = " . (int)$_SESSION['languages_id'] . "), " .
                                              TABLE_NEWS_AUTHORS . " na
                                     WHERE n.authors_id = na.authors_id
                                       AND n.news_status = '1'
                                       AND n.news_date_published = '" . $date_selector->fields['news_date_published'] . "'
                                     ORDER BY n.sort_order");
            while (!$article->EOF) {
              $xtags = array();
              $link = zen_href_link(FILENAME_NEWS_ARTICLE, 'article_id=' . $article->fields['article_id'] . $additionalURL, 'NONSSL', false);
              $rss->rss_feed_item($article->fields['news_article_name'],
                                  $link,
                                  array('url' => $link, 'PermaLink' => true),
                                  date('r', strtotime($article->fields['news_date_published'])),
                                  news_create_news_summary($article->fields['news_article_text'], $article->fields['news_article_shorttext']),
                                  $article->fields['news_image'],
                                  zen_href_link(FILENAME_NEWS_COMMENTS, 'article_id=' . $article->fields['article_id'] . $additionalURL, 'NONSSL', false),
                                  $article->fields['author_name'] . " <" . $article->fields['author_email'] . ">",
                                  false,
                                  false,
                                  $xtags
                                  );
              $article->MoveNext();
            }
            $date_selector->MoveNext();
          }
          break;
    
    
        case "categories":
          // don't build a tree when no categories
          $check_categories = $db->Execute("select categories_id from " . TABLE_CATEGORIES . " where categories_status = '1' limit 1");
          if ($check_categories->RecordCount() > 0) {
            if(isset($_GET['cPath'])) {
              $categories = $db->Execute("SELECT c.categories_id, c.parent_id, GREATEST(c.date_added, IFNULL(c.last_modified, 0)) AS categories_date, c.categories_image, cd.categories_name, cd.categories_description
                                          FROM " . TABLE_CATEGORIES . " c
                                            LEFT JOIN " . TABLE_CATEGORIES_DESCRIPTION . " cd on c.categories_id = cd.categories_id
                                          WHERE c.parent_id = " . (int)$id_parent . "
                                            AND cd.language_id = " . (int)$_SESSION['languages_id'] . "
                                            AND c.categories_status= '1'
                                          ORDER BY c.sort_order, cd.categories_name",
                                          '', false, 150);
    
    
              if(!$categories->EOF) {
                $link_categories = addslashes(zen_href_link(FILENAME_DEFAULT, 'cPath=' . $cPath . $additionalURL, 'NONSSL', false));
                $rss->rss_feed_item($categories->fields['categories_name'],
                                    $link_categories,
                                    array('url' => $link_categories, 'PermaLink' => true),
                                    date('r', strtotime($categories->fields['categories_date'])),
                                    $categories->fields['categories_description'],
                                    $categories->fields['categories_image'],
                                    false,
                                    (RSS_AUTHOR == ''? STORE_OWNER_EMAIL_ADDRESS . " <" . STORE_OWNER . ">" : RSS_AUTHOR)
                                    );
                if(!isset($_GET['limit']) || (int)$_GET['limit'] >1) {
                  zen_rss_category_tree($current_category_id, $cPath, isset($_GET['limit']) ? ((int)$_GET['limit']-1) : 32767);
                }
              }
            } else {
              zen_rss_category_tree(0, '', isset($_GET['limit']) ? (int)$_GET['limit'] : 32767);
            }
          }
          break;
    
    
        case "specials_random":
          $random = true;
          $rss->rssFeedCacheSet(false);
          $limit = " LIMIT " . MAX_RANDOM_SELECT_SPECIALS;
        case "specials":
        $sale_categories = $db->Execute("SELECT sale_categories_all FROM " . TABLE_SALEMAKER_SALES . " WHERE sale_status = 1");
        
        
        if ($sale_categories->RecordCount() > 0){
        $sale_categories_all = '';
        while(!$sale_categories->EOF) {
              $sale_categories_all .= substr($sale_categories->fields['sale_categories_all'], 0, -1); 
              $sale_categories->MoveNext();
        }
        $sale_categories_all = substr($sale_categories_all, 1); 
    
    
           $specials_product_query = "SELECT DISTINCT p.products_id, pd.products_name, pd.products_description, p.products_image, p.products_date_added, p.products_last_modified, p.products_price, p.products_tax_class_id, s.specials_new_products_price as price, p.products_quantity, p.products_model, p.products_weight, p.manufacturers_id, p.master_categories_id, m.manufacturers_name, r.reviews_rating
                                     FROM " . TABLE_PRODUCTS . " p
                                       LEFT JOIN " . TABLE_PRODUCTS_DESCRIPTION . " pd ON (pd.products_id = p.products_id)
                                       LEFT JOIN " . TABLE_MANUFACTURERS . " m ON (p.manufacturers_id = m.manufacturers_id)
                                       LEFT JOIN " . TABLE_REVIEWS . " r ON (p.products_id = r.products_id)
                                       LEFT JOIN " . TABLE_SPECIALS . " s ON (p.products_id = s.products_id)
                                     WHERE p.products_status = 1
                                       AND pd.language_id = " . (int)$_SESSION['languages_id'] . "
                                       AND (s.status = 1 OR (p.master_categories_id IN ($sale_categories_all))) " . $limit;
    
    
    } else {
      
           $specials_product_query = "SELECT DISTINCT p.products_id, pd.products_name, pd.products_description, p.products_image, p.products_date_added, p.products_last_modified, p.products_price, p.products_tax_class_id, s.specials_new_products_price as price, p.products_quantity, p.products_model, p.products_weight, p.manufacturers_id, m.manufacturers_name, r.reviews_rating
                                     FROM " . TABLE_PRODUCTS . " p
                                       LEFT JOIN " . TABLE_PRODUCTS_DESCRIPTION . " pd ON (pd.products_id = p.products_id)
                                       LEFT JOIN " . TABLE_MANUFACTURERS . " m ON (p.manufacturers_id = m.manufacturers_id)
                                       LEFT JOIN " . TABLE_REVIEWS . " r ON (p.products_id = r.products_id)
                                       LEFT JOIN " . TABLE_SPECIALS . " s ON (p.products_id = s.products_id)
                                     WHERE p.products_status = 1
                                       AND pd.language_id = " . (int)$_SESSION['languages_id'] . "
                                       AND s.status = 1  " . $limit;
    }
          zen_rss_products($specials_product_query, $random);
          break;
    
    
        case "featured_random":
          $random = true;
          $rss->rssFeedCacheSet(false);
          $limit = " LIMIT " . MAX_RANDOM_SELECT_FEATURED_PRODUCTS;
        case "featured":
          $featured_products_query = "SELECT DISTINCT p.products_id, pd.products_name, pd.products_description, p.products_image, p.products_date_added, p.products_last_modified, p.products_price_sorter as price, p.products_tax_class_id, p.products_quantity, p.products_model, p.products_weight, p.manufacturers_id, m.manufacturers_name, r.reviews_rating
                                      FROM " . TABLE_PRODUCTS . " p
                                        LEFT JOIN " . TABLE_FEATURED . " f on p.products_id = f.products_id
                                        LEFT JOIN " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id
                                        LEFT JOIN " . TABLE_MANUFACTURERS . " m ON (p.manufacturers_id = m.manufacturers_id)
                                        LEFT JOIN " . TABLE_REVIEWS . " r ON (p.products_id = r.products_id)
                                      WHERE p.products_status = 1
                                       AND f.status = '1'
                                       AND pd.language_id = " . (int)$_SESSION['languages_id'] . "
                                      ORDER BY pd.products_name DESC" . $limit;
          zen_rss_products($featured_products_query, $random);
          break;
    
    
        case "best_sellers_random":
          $random = true;
          $rss->rssFeedCacheSet(false);
          $limit = " LIMIT " . MAX_DISPLAY_BESTSELLERS;
        case "best_sellers":
          $where_cat = $from_cat = "";
          if (isset($current_category_id) && ($current_category_id > 0)) {
            if (RSS_PRODUCTS_CATEGORIES == 'all') {
              $from_cat = ", " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c ";
              $where_cat = " AND p.products_id = p2c.products_id
                             AND c.categories_id = " . (int)$current_category_id . "
                             AND p2c.categories_id = " . (int)$current_category_id . " ";
            } else {
              $where_cat = " AND p.master_categories_id = " . (int)$current_category_id . " ";
            }
          }
          $best_sellers_query = "SELECT DISTINCT p.products_id, pd.products_name, pd.products_description, p.products_image, p.products_date_added, p.products_last_modified, p.products_ordered, p.products_price_sorter as price, p.products_tax_class_id, p.products_quantity, p.products_model, p.products_weight, p.manufacturers_id, m.manufacturers_name, r.reviews_rating
                                 FROM " . TABLE_PRODUCTS . " p
                                   LEFT JOIN " . TABLE_PRODUCTS_DESCRIPTION . " pd ON (pd.products_id = p.products_id)
                                   LEFT JOIN " . TABLE_MANUFACTURERS . " m ON (p.manufacturers_id = m.manufacturers_id)
                                   LEFT JOIN " . TABLE_REVIEWS . " r ON (p.products_id = r.products_id)
                                 " . $from_cat . "
                                 WHERE p.products_status = 1
                                   AND p.products_ordered > 0
                                   AND pd.language_id = " . (int)$_SESSION['languages_id'] . $where_cat ."
                                 ORDER BY p.products_ordered DESC, pd.products_name" . $limit;
          zen_rss_products($best_sellers_query, $random);
          break;
    
    
        case "upcoming_random":
          $random = true;
          $rss->rssFeedCacheSet(false);
          $limit = " LIMIT " . MAX_DISPLAY_UPCOMING_PRODUCTS;
        case "upcoming":
          $where_cat = $from_cat = "";
          $display_limit = zen_get_upcoming_date_range();
          if (isset($current_category_id) && ($current_category_id > 0)) {
            if (RSS_PRODUCTS_CATEGORIES == 'all') {
              $from_cat = ", " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c ";
              $where_cat = "AND p.products_id = p2c.products_id
                            AND c.categories_id = " . (int)$current_category_id . "
                            AND p2c.categories_id = " . (int)$current_category_id . " ";
            } else {
              $where_cat = "AND p.master_categories_id = " . (int)$current_category_id . " ";
            }
          }
          $expected_query = "SELECT DISTINCT p.products_id, pd.products_name, pd.products_description, p.products_image, p.products_date_added, p.products_last_modified, p.products_date_available as date_expected, p.products_price_sorter as price, p.products_tax_class_id, p.products_quantity, p.products_model, p.products_weight, p.manufacturers_id, m.manufacturers_name, r.reviews_rating
                             FROM " . TABLE_PRODUCTS . " p
                               LEFT JOIN " . TABLE_PRODUCTS_DESCRIPTION . " pd ON (pd.products_id = p.products_id)
                               LEFT JOIN " . TABLE_MANUFACTURERS . " m ON (p.manufacturers_id = m.manufacturers_id)
                               LEFT JOIN " . TABLE_REVIEWS . " r ON (p.products_id = r.products_id)
                             " . $from_cat . "
                             WHERE to_days(products_date_available) >= to_days(now())
                               AND p.products_status = 1
                               AND pd.language_id = " . (int)$_SESSION['languages_id'] . "
                             " . $where_cat . "
                             " . $display_limit . "
                             ORDER BY " . EXPECTED_PRODUCTS_FIELD . " " . EXPECTED_PRODUCTS_SORT . $limit;
          zen_rss_products($expected_query, $random);
          break;
    
    
        case "new_products_random":
          $random = true;
          $rss->rssFeedCacheSet(false);
          $limit = " LIMIT " . MAX_RANDOM_SELECT_NEW;
        case "new_products":
          $disp_order_default = PRODUCT_NEW_LIST_SORT_DEFAULT;
          require(DIR_WS_MODULES . zen_get_module_directory(FILENAME_LISTING_DISPLAY_ORDER));
          $where_days = zen_get_new_date_range();
    
    
        case "products":
        default:
          $where_cat = $from_cat = "";
          if (isset($current_category_id) && ($current_category_id > 0)) {
            if (RSS_PRODUCTS_CATEGORIES == 'all') {
            $from_cat = ", " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c ";
            $where_cat = "AND p.products_id = p2c.products_id
                          AND c.categories_id = " . (int)$current_category_id . "
                          AND p2c.categories_id = " . (int)$current_category_id . " ";
            } else {
              $where_cat = "AND p.master_categories_id = " . (int)$current_category_id . " ";
            }
          }
          $where_prod = '';
          if(isset($_GET['products_id'])) {
            $where_prod = " AND p.products_id=" . (int)$_GET['products_id'];
            $limit = " LIMIT 1";
          } else if(isset($_GET['products_model'])) {
            $where_prod = " AND p.products_model=" . zen_db_input(zen_db_prepare_input($_GET['products_model']));
          }
          if(!isset($order_by)) $order_by = " ORDER BY p.products_last_modified DESC, p.products_sort_order";
          if(!isset($where_days)) $where_days = '';
          $sql_products = "SELECT DISTINCT p.products_sort_order, p.products_id, pd.products_name, pd.products_description, p.products_image, p.products_date_added, p.products_last_modified, p.master_categories_id, p.products_price_sorter AS price, p.products_tax_class_id, p.products_quantity, p.products_model, p.products_weight, p.manufacturers_id, m.manufacturers_name, r.reviews_rating
                           FROM " . TABLE_PRODUCTS . " p
                             LEFT JOIN " . TABLE_PRODUCTS_DESCRIPTION . " pd ON (p.products_id = pd.products_id)
                             LEFT JOIN " . TABLE_MANUFACTURERS . " m ON (p.manufacturers_id = m.manufacturers_id)
                             LEFT JOIN " . TABLE_REVIEWS . " r ON (p.products_id = r.products_id)
                             " . $from_cat . "
                           WHERE pd.language_id = " . (int)$_SESSION['languages_id'] . "
                             AND p.products_status = 1
                             " . $where_cat . "
                             " . $where_days . "
                             " . $where_prod . "
                             " . $order_by . "
                             " . $limit;
          zen_rss_products($sql_products, $random);
          break;
      }
    
    
    }
    
    
      function zen_rss_products($sql_products, $random){
        global $db, $currencies, $rss, $additionalURL;
    
    
        $imageSize = (isset($_GET['imgsize']) ? $_GET['imgsize'] : RSS_DEFAULT_IMAGE_SIZE);
    
    
    
    
          if ($random) {
          $products = zen_random_select($sql_products);
        } else {
          $products = $db->Execute($sql_products);
        }
        $cashTaxRate = array();
        while(!$products->EOF) {
          $info_page = zen_get_info_page($products->fields['products_id']);
          $xtags = array();
    
    
          $link = zen_href_link($info_page, 'products_id=' . $products->fields['products_id'] . $additionalURL, 'NONSSL', false);
    
    
          $products_description = $products->fields['products_description'];
          if (RSS_PRODUCTS_DESCRIPTION_IMAGE == 'true' && zen_not_null($products->fields['products_image'])) {
            $image_url = zen_image(DIR_WS_IMAGES . $products->fields['products_image'], $products->fields['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'style="float: left; margin: 0px 8px 8px 0px;"');
            $image_url = str_replace('<img src="', '<img src="' . HTTP_SERVER . DIR_WS_CATALOG, $image_url);
            $image_link = '<a href="' . $link . '">' . $image_url . '</a>';
            if(RSS_STRIP_TAGS == 'true') {
              $products_description = '<![CDATA[' . $image_link . ']]>' . $products_description;
            } else {
              $products_description = $image_link . $products_description;
            }
          }
    
    
          if (RSS_PRODUCTS_DESCRIPTION_BUYNOW == 'true') {
    
    
            $buynow_button = str_replace('<img src="', '<img src="' . HTTP_SERVER . DIR_WS_CATALOG, zen_image_button(BUTTON_IMAGE_BUY_NOW, BUTTON_BUY_NOW_ALT));
            $buynow_button = preg_replace('@onmouseover="[^"]*"@i', '', $buynow_button);
            $buynow_button = preg_replace('@onmouseout="[^"]*"@i', '', $buynow_button);
            $buynow_button = str_replace(' >', '>', $buynow_button);
    
    
            $buynow_link = '<br /><br />' . '<a href="' . zen_href_link(FILENAME_SHOPPING_CART, 'products_id=' . $products->fields['products_id'] . '&action=buy_now' . $additionalURL, 'SSL', false) . '" target="_blank">' . $buynow_button . '</a>' . "\n";
            if(RSS_STRIP_TAGS == 'true') {
              $products_description .= "\n" . '<![CDATA[' . $buynow_link . ']]>';
            } else {
              $products_description .= "\n" . $buynow_link;
            }
          }
    
    
          if (RSS_BUYNOW_LINK == 'true') {
    
    
            $buynow_button = str_replace('<img src="', '<img src="' . HTTP_SERVER . DIR_WS_CATALOG, zen_image_button(BUTTON_IMAGE_BUY_NOW, BUTTON_BUY_NOW_ALT));
            $buynow_button = preg_replace('@onmouseover="[^"]*"@i', '', $buynow_button);
            $buynow_button = preg_replace('@onmouseout="[^"]*"@i', '', $buynow_button);
            $buynow_button = str_replace(' >', '>', $buynow_button);
    
    
            $buynow_link = zen_href_link(FILENAME_SHOPPING_CART, 'products_id=' . $products->fields['products_id'] . '&action=buy_now' . $additionalURL, 'SSL', false);
            $xtags['zencart:buynow_link'] = $buynow_link;
            $xtags['zencart:buynow_button'] = $buynow_button;
          }
    
    
    
    
    date_default_timezone_set('Europe/Vienna');
          $rss->rss_feed_item($products->fields['products_name'],
                              $link,
                              array('url' => $link, 'PermaLink' => true),
                              date('r', strtotime($products->fields['products_date_added'])),
                              $products_description,
                              $rss->_clear_url($products->fields['products_image']),
                              zen_href_link(FILENAME_PRODUCT_REVIEWS,'products_id=' . $products->fields['products_id'] . $additionalURL, 'NONSSL', false),
                              (RSS_AUTHOR == ''? STORE_OWNER_EMAIL_ADDRESS . " <" . STORE_OWNER . ">" : RSS_AUTHOR),
                              false,
                              false,
                              $xtags
                              );
          if ($random)
            break;
          $products->MoveNext();
        }
      }
    
    
      function zen_rss_category_tree($id_parent=0, $str_cPath='', $limit = 32767){
        global $db, $rss, $additionalURL;
        if($limit < 0) return;
        $categories = $db->Execute("SELECT c.categories_id, c.parent_id, GREATEST(c.date_added, IFNULL(c.last_modified, 0)) AS categories_date, c.categories_image, cd.categories_name, cd.categories_description
                           FROM " . TABLE_CATEGORIES . " c
                             LEFT JOIN " . TABLE_CATEGORIES_DESCRIPTION . " cd on c.categories_id = cd.categories_id
                           WHERE c.parent_id = " . (int)$id_parent . "
                             AND cd.language_id = " . (int)$_SESSION['languages_id'] . "
                             AND c.categories_status = 1
                           ORDER BY c.sort_order, cd.categories_name",
                           '', false, 150);
        if ($categories->RecordCount() == 0)
          return;
        while(!$categories->EOF && $limit>0) {
          $new_str_cPath = (zen_not_null($str_cPath) ? $str_cPath . '_' . $categories->fields['categories_id'] : $categories->fields['categories_id']);
          $products_in_category = zen_count_products_in_category($categories->fields['categories_id']);
          if ((CATEGORIES_COUNT_ZERO == '1' && $products_in_category == 0) or $products_in_category >= 1) {
            $limit--;
            $link = zen_href_link(FILENAME_DEFAULT, 'cPath=' . $new_str_cPath . $additionalURL, 'NONSSL', false);
            $rss->rss_feed_item($categories->fields['categories_name'],
                                $link,
                                array('url' => $link, 'PermaLink' => true),
                                date('r', strtotime($categories->fields['categories_date'])),
                                $categories->fields['categories_description'],
                                $categories->fields['categories_image'],
                                false,
                                (RSS_AUTHOR == ''? STORE_OWNER_EMAIL_ADDRESS . " <" . STORE_OWNER . ">" : RSS_AUTHOR)
                                );
          }
          if (zen_has_category_subcategories($categories->fields['categories_id'])) {
            zen_rss_category_tree($categories->fields['categories_id'], $new_str_cPath, $limit);
          }
          $categories->MoveNext();
        }
      }
    // EOF
    !!! kostenloser Support ausschließlich im Forum - Nicht per Email, nicht per Telefon und nicht per PM !!!

  11. #10
    Padawan Stufe VI Avatar von bumerang24
    Registriert seit
    25.11.2011
    Ort
    München
    Beiträge
    759
    Themen
    122
    DANKE
    46
    Erhaltene Danke: 57
    Erstellt von

    Standard

    Hallo Webchills,

    habe ich so kopiert....
    Der Erfolg:
    Code:
    [09-Aug-2017 06:58:13 Europe/Berlin] PHP Parse error:  syntax error,  unexpected '@' in  /XXX/XXX/ZC_SHOP_155/includes/modules/pages/rss_feed/header_php.php on  line 15
    irgendwo läuft immer noch was schief, ich kann aber nicht verstehen was

Seite 1 von 2 12 LetzteLetzte

Ähnliche Themen

  1. RSS Feed für 1.5.1
    Von MarcR im Forum RSS Feed
    Antworten: 14
    Letzter Beitrag: 15.02.2015, 18:20
  2. RSS Feed 2.1.4
    Von Thommy im Forum Archivierte Beiträge Zen-Cart Support
    Antworten: 6
    Letzter Beitrag: 03.07.2012, 18:40
  3. Problem: MySQL Unterstützung
    Von xXxWorldOfWomanxXx im Forum Archivierte Beiträge Zen-Cart Support
    Antworten: 6
    Letzter Beitrag: 27.01.2011, 13:29
  4. 1054 - Problem mit MySQL 5
    Von flash2th im Forum Archivierte Beiträge Zen-Cart Support
    Antworten: 17
    Letzter Beitrag: 30.03.2009, 17:37
  5. RSS Feed
    Von simmsen im Forum Feedback zum Forum
    Antworten: 5
    Letzter Beitrag: 28.10.2008, 11:15

Lesezeichen

Berechtigungen

  • Neue Themen erstellen: Nein
  • Themen beantworten: Nein
  • Anhänge hochladen: Nein
  • Beiträge bearbeiten: Nein
  •  
zen-cart-pro.at
Zen Cart ist eine kostenlose unter der GPL-Lizenz veröffentlichte Open-Source Shopsoftware. Das System wird in den USA entwickelt, die amerikanische Website dazu ist www.zen-cart.com

Die deutsche Zen-Cart Version, um die es hier auf zen-cart-pro.at geht, ist eine Anpassung der amerikanischen Version an die Bedürfnisse von Onlineshopbetreibern im deutschsprachigen Raum.
Die amerikanische Zen-Cart Version berücksichtigt viele rechtliche Erfordernisse nicht, denen ein Onlineshop im deutschsprachigen Raum unterworfen ist. Daher wurde die deutsche Zen-Cart Version nicht nur bloß ins Deutsche übersetzt, sondern auch funktional auf die Anforderungen, die an Onlineshops in Deutschland, Österreich und der Schweiz gestellt werden, angepasst.

Die amerikanische Version ist extrem abgespeckt und stellt weiterführende Funktionalitäten durch zusätzliche Module bereit, die erst mühsam manuell installiert werden müssen. Zahlreiche häufig genutzte Erweiterungen und eigene Entwicklungen sind in der deutschen Zen Cart Version bereits vorinstalliert.
Die deutsche Zen-Cart Version bietet außerdem einen völlig multilingualen Adminbereich. Weitere für die deutsche Zen Cart Version angepasste Erweiterungen stehen in unserem Downloadbereich zur Verfügung.

Die deutsche Zen Cart Version wird seit 15 Jahren von einem Team von Entwicklern in Österreich und Deutschland betreut, weiterentwickelt und supportet und steht kostenlos in unserem Downloadbereich zur Verfügung.

[mehr]
Follow Us
  • zen-cart-pro-at auf Twitter
  • zen-cart-pro-at auf Github
  • zen-cart-pro-at auf SourceForge
Aktuelle Version
Zen Cart 1.5.6d deutsch
vom 07.11.2019
[Download]

unterstützen
Unterstütze die Weiterentwicklung der deutschen Zen Cart Version mit einer Spende!

Spende für die Weiterentwicklung der deutschen Zen Cart Version