Forum

Shopstat änderunge

 
Neuen Beitrag schreiben   Auf Beitrag antworten    ShopStat Foren-Übersicht // xt:Commerce
Vorheriges Thema anzeigen :: Nächstes Thema anzeigen  
Autor Nachricht
boen



Anmeldungsdatum: 07.01.2010
Beiträge: 1
Wohnort: Dresden

BeitragVerfasst am: 07.01.2010 19:32    Titel: Shopstat änderunge
Hallo Hartmut,

muss schon sagen genail das Shopstat modul, habe aber einges am xtc verändert, benutze 4 sprachen und hab viele dinge selbst hinbekommen, einige Dinge schaffe ich selbst nicht.

z.Bsp. das Infocenter und die Hersteller wollen nicht funktionieren.

Hier mal meine Dateien und der Link zum shop: http://www.fechtsport-dresden.de

Code:
<?PHP
/*-----------------------------------------------------------------------
    Version: $Id: shopstat_functions.inc.php,v 1.7 2005/05/20 08:00:12 Administrator Exp $
    xtC-SEO-Module by www.ShopStat.com (Hartmut König)
    http://www.shopstat.com
    info@shopstat.com
    © 2004 ShopStat.com
    All Rights Reserved.
------------------------------------------------------------------------*/
if(!function_exists('xtDBquery'))
    {
    require_once(DIR_FS_INC . 'shopstat_functions_xtc2.inc.php');
    }

function shopstat_getSEO(   $page               = '',
                            $parameters         = '',
                            $connection         = 'NONSSL',
                            $add_session_id     = true,
                            $search_engine_safe = true,
                            $mode               = 'user')
{
        if($mode == 'admin')
            {
            require_once(DIR_FS_INC . 'xtc_parse_category_path.inc.php');
            require_once(DIR_FS_INC . 'xtc_get_product_path.inc.php');
            require_once(DIR_FS_INC . 'xtc_get_parent_categories.inc.php');
            require_once(DIR_FS_INC . 'xtc_check_agent.inc.php');
            }
        else{
            require_once(DIR_FS_INC . 'xtc_get_products_name.inc.php');
            require_once(DIR_FS_INC . 'xtc_get_manufacturers.inc.php');
            }

        global $languages_id;

        //-- XTC
        (!isset($languages_id)) ? $languages_id = $_SESSION['languages_id'] : false;

        $go     = true;
        //-- Nur bei der index.php und product_info.php
        if( $page != "index.php" &&
            $page != "product_info.php" &&
            $page != "shop_content.php")
            {
            $go = false;
            }
        //-- Unter diesen Bedingungen werden die URLs nicht umgewandelt
        //-- Sortieren
        elseif(preg_match("/sort=/",$parameters))
            {
            $go = false;
            }
        //-- Sortieren der Herstellerprodukte
        elseif(preg_match("/filter_id=/",$parameters))
            {
            $go = false;
            }
        //-- Andere Aktion
        elseif(preg_match("/action=/",$parameters))
            {
            $go = false;
            }

        preg_match("/(?:cPath)\=([^\&]*)/",$parameters,$caterg);
        preg_match("/[&|?]{0,1}(?:^products_id)\=([^\&]*)/",$parameters,$proderg);
        preg_match("/(?:coID)\=([^\&]*)/",$parameters,$coerg);
        preg_match("/(?:content)\=([^\&]*)/",$parameters,$conterg);

        //-- Manufacturer
        preg_match("/(?:manufacturers_id)\=([^\&]*)/",$parameters,$manuerg);
        //preg_match("/(?:filter_id)\=([^\&]*)/",$parameters,$filtererg);

        //-- Paging
        preg_match("/(?:page)\=([^\&]*)/",$parameters,$pagerg);

        //-- Language
        preg_match("/(?:language)\=([^\&]*)/",$parameters,$lang);

      //-- Infocenter
      preg_match("/(?:cms)\=([^\&]*)/",$parameters,$icentercmserg);
      preg_match("/(?:item)\=([^\&]*)/",$parameters,$icenteritemerg);

        $cPath      = $caterg[1];
        $prodid     = $proderg[1];
        $content    = $conterg[1];
        $coid       = $coerg[1];
        $maid       = $manuerg[1];
        //$filterid   = $filtererg[1];
        $pager      = $pagerg[1];
      $icentercms = $icentercmserg[1];
      $icenteritem = $icenteritemerg[1];
        if ($go &&
            (   xtc_not_null($maid) ||
                xtc_not_null($cPath) ||
                xtc_not_null($prodid) ||
                xtc_not_null($coid)||
            xtc_not_null($icentercms) ||
            xtc_not_null($icenteritem)
                )
             )
            {
            if ($connection == 'SSL')
                {
                if (ENABLE_SSL == true)
                    {
                    $link = HTTPS_SERVER . DIR_WS_CATALOG;
                    }
                else{
                    $link = HTTP_SERVER . DIR_WS_CATALOG;
                    }
                }
            else{
                $link = HTTP_SERVER . DIR_WS_CATALOG;
                }

            if((xtc_not_null($cPath) || xtc_not_null($prodid)) )
                {
                $cPath_array        = xtc_parse_category_path($cPath);
                $cPath              = implode('_', $cPath_array);
                $current_category_id= $cPath_array[(sizeof($cPath_array)-1)];

                if(!$current_category_id && $prodid)
                    {
                    $current_category_id = xtc_get_product_path($prodid);
                    }

                // -------------------------------------------------
                if(!$prodid)
                    {
                    $category['categories_name'] = shopstat_getRealPath($cPath);

                    $link .= shopstat_hrefCatlink($category['categories_name'],$cPath,$pager);
                    }
                else{
                    $category['categories_name'] = shopstat_getRealPath(xtc_get_product_path($prodid));

                    $link .= shopstat_hrefLink($category['categories_name'],
                                               xtc_get_products_name($prodid,$languages_id),
                                               $prodid
                                               );
                    }
                }
            elseif(xtc_not_null($coid))
                {
//-- 05.03.2006
/*
                if(xtc_not_null($content))
                    {
                    //-- Trennen von Name und Erweiterung und ID einmontieren
                    if(preg_match("/\./",$content))
                        {
                        $content = substr($content,0,strrpos ($content, "."));
                        }
                    }
                else{
*/
                    $content = shopstat_getContentName($coid, $languages_id);

//                    }

                $link .= shopstat_hrefContlink($content, $coid);

                }
            elseif(xtc_not_null($icentercms) || xtc_not_null($icenteritem)) // item
                {
               if(!$icenteritem){
                  $cat_name = shopstat_getInfoCenterCmsName($icentercms, $languages_id);
                  $link .= shopstat_hrefInfoCenterCmslink($cat_name, $icentercms);
               }else{
                  $cat_name = shopstat_getInfoCenterCmsName($icentercms, $languages_id);
                  $item_name = shopstat_getInfoCenterItemName($icenteritem, $languages_id);
               
                  $link .= shopstat_hrefInfoCenterItemlink($cat_name, $item_name, $icenteritem);               
               }

                }

            elseif(xtc_not_null($maid))
                {
                $manufacturers = xtc_get_manufacturers();
                foreach($manufacturers as $manufacturer)
                    {
                    if($manufacturer['id'] == $maid)
                        {
                        $maname = $manufacturer['text'];
                        break;
                        }
                    }

                $link .= shopstat_hrefManulink($maname, $maid, $pager);
                }

            $separator  = '?';
            }

    //-- Concat the lang-var
    //-- Check parameters and given language, just concat
    //-- if the language is different
    if(sizeof($lang)>0)
        {
        $lng = new language;
        if( $lng->catalog_languages[$lang[1]]['id'] != $languages_id &&
            $link != "")
            {
            $link .= $separator.$lang[0];
            }
        }

    return($link);
}
/*
 * FUNCTION shopstat_getRealPath
 * Get the 'breadcrumb'-path
 */
function shopstat_getRealPath($cPath, $delimiter = '/')
{
    if(empty($cPath)) return;

    $path       = explode("_",$cPath);
    $categories = array();

    foreach($path as $key => $value)
        {
        $categories[$key] = shopstat_getCategoriesName($value, $language);
        }

    $realpath = implode($delimiter,$categories);

    return($realpath);
}
function shopstat_getContentName($coid, $language = '')
{
    if(empty($coid)) return;
    if(empty($language)) $language = $_SESSION['languages_id'];

   $content_query  = "SELECT content_title FROM ".TABLE_CONTENT_MANAGER." WHERE languages_id='".intval($language)."' AND content_group = ".intval($coid);
   $content_query  = xtDBquery($content_query);
    $content_data   = xtc_db_fetch_array($content_query, true);

    return($content_data['content_title']);

}
/*
 * FUNCTION shopstat_getCategoriesName
 * Get the Category-Name from a give CID
 */
function shopstat_getCategoriesName($categories_id, $language = '')
{
    if(empty($categories_id)) return;
    if(empty($language)) $language = $_SESSION['languages_id'];

    $categories_query   = "SELECT categories_name FROM " . TABLE_CATEGORIES_DESCRIPTION . " WHERE categories_id = '" . intval($categories_id) . "' and language_id = '" . intval($language) . "'";
    $categories_query   = xtDBquery($categories_query);
    $categories         = xtc_db_fetch_array($categories_query,true);

    return $categories['categories_name'];
}
/*
 * FUNCTION shopstat_hrefLink
 */
function shopstat_hrefLink($cat_desc, $product_name, $product_id)
{
    $link = "";

    if(shopstat_hrefSmallmask($cat_desc))
        {
        $link .= shopstat_hrefSmallmask($cat_desc)."/";
        }

    $link .= shopstat_hrefMask($product_name)."--".$product_id.".html";

    return($link);
}
/*
 * FUNCTION shopstat_hrefCatlink
 */
function shopstat_hrefCatlink($category_name, $category_id, $pager=false)
{
    $link = shopstat_hrefSmallmask($category_name)."---".$category_id;

    if($pager && $pager != 1)
        {
        $link .= "-".$pager.".html";
        }
    else{
        $link .= ".html";
        }

    return($link);
}
/*
 * FUNCTION shopstat_hrefContlink
 */
function shopstat_hrefContlink($content_name, $content_id)
{
    $link = shopstat_hrefMask($content_name)."-_-".$content_id.".html";

    return($link);
}
/*
 * FUNCTION shopstat_hrefManulink
 */
function shopstat_hrefManulink($content_name, $content_id, $pager=false)
{
    $link = shopstat_hrefMask($content_name)."-.-".$content_id;

    if($pager && $pager != 1)
        {
        $link .= "-".$pager.".html";
        }
    else{
        $link .= ".html";
        }

    return($link);
}
/*
 * FUNCTION shopstat_hrefSmallmask
 */
function shopstat_hrefSmallmask($string)
{
    shopstat_getRegExps($search, $replace);

    //-- <br> neutralisieren
    $newstring  = preg_replace("/<br>/i","-",$string);

    //-- HTML entfernen
    $newstring  = strip_tags($newstring);

    //-- Schrägstriche entfernen
    $newstring  = preg_replace("/\s\/\s/","+",$newstring);

    //-- Definierte Zeichen entfernen
    $newstring  = preg_replace($search,$replace,$newstring);

    //-- Die nun noch (komisch aussehenden) doppelten Bindestriche entfernen
    $newstring  = preg_replace("/(-){2,}/","-",$newstring);

    return($newstring);
}
/*
 * FUNCTION shopstat_hrefMask
 */
function shopstat_hrefMask($string)
{
    shopstat_getRegExps($search, $replace);

    //-- <br> neutralisieren
    $newstring  = preg_replace("/<br>/i","-",$string);

    //-- HTML entfernen
    $newstring  = strip_tags($newstring);

    //-- Schrägstriche entfernen
    $newstring  = preg_replace("/\//","-",$newstring);

    //-- Definierte Zeichen entfernen
    $newstring  = preg_replace($search,$replace,$newstring);
//if($_REQUEST['test']){print $newstring."<br>";}

    //-- String URL-codieren
    $newstring  = urlencode($newstring);

    //-- Die nun noch (komisch aussehenden) doppelten Bindestriche entfernen
    $newstring  = preg_replace("/(-){2,}/","-",$newstring);
//if($_REQUEST['test']){print $newstring."<hr>";}
    return($newstring);
}
function shopstat_getRegExps(&$search, &$replace)
{
    $search     = array(
                        "'\s&\s'",          //--Kaufmännisches Und mit Blanks muss raus
            "'[\r\n\s]+'",       // strip out white space
            "'&(quote|#34);'i",   // replace html entities
            "'&(amp|#38);'i",
            "'&(lt|#60);'i",
            "'&(gt|#62);'i",
            "'&(nbsp|#160);'i",
            "'&(iexcl|#161);'i",
            "'&(cent|#162);'i",
            "'&(pound|#163);'i",
            "'&(copy|#169);'i",
                        "'&'",              //--Kaufmännisches Und wird +
                        "'%'",              //--Prozent muss weg
                        "/[\[\({]/",        //--öffnende Klammern nach Bindestriche
                        "/[\)\]\}]/",       //--schliessende Klammern weg
                        "/ß/",              //--Umlaute etc.
                        "/ä/",              //--Umlaute etc.
                        "/ü/",              //--Umlaute etc.
                        "/ö/",              //--Umlaute etc.
                        "/Ä/",              //--Umlaute etc.
                        "/Ü/",              //--Umlaute etc.
                        "/Ö/",              //--Umlaute etc.
                        "/Å /",              //--Umlaute etc.
                        "/ó/",              //--Umlaute etc.
                        "/é/",              //--Umlaute etc.
                        "/È/",              //--Umlaute etc.
                        "/Å¡/",              //--Umlaute etc.
                        "/í/",              //--Umlaute etc.
                        "/-#328;/",         //--Umlaute etc.
                        "/-#345;/",         //--Umlaute etc.
                        "/ù/",         //--Umlaute etc.
                        "/ò/",         //--Umlaute etc.
                        "/è/",         //--Umlaute etc.
                        "/á/",         //--Umlaute etc.
                        "/ý/",         //--Umlaute etc.
                        "/-#269;/",         //--Umlaute etc.
                        "/-#367;/",         //--Umlaute etc.
                        "/'|\"|´|`/",       //--Anführungszeichen weg.
                        "/[:,\.!?\*\+]/",   //--Doppelpunkte, Komma, Punkt etc. weg.
                        );
    $replace    = array(
                        "-",
            "-",
            "\"",
            "-",
            "<",
            ">",
            "",
            chr(161),
            chr(162),
            chr(163),
            chr(169),
                        "-",
            "+",
                        "-",
                        "",
                        "ss",
                        "ae",
                        "ue",
                        "oe",
                        "Ae",
                        "Ue",
                        "Oe",
                        "S",
                        "o",
                        "e",
                        "E",
                        "s",
                        "i",
                        "n",
                        "r",
                        "u",
                        "o",
                        "e",
                        "a",
                        "y",
                        "c",
                        "u",
                        "",
                        ""
                        );
}
?>


Code:

# $Id: .htaccess,v 1.5 2005/05/19 17:09:19 Administrator Exp $
#
# This is used with Apache WebServers
#
# For this to work, you must include the parameter 'Options' to
# the AllowOverride configuration
#
# Example:
#
#<Directory "/usr/local/apache/htdocs">
#   AllowOverride Options
#</Directory>
#
# 'All' with also work. (This configuration is in the
# apache/conf/httpd.conf file)
# The following makes adjustments to the SSL protocol for Internet
# Explorer browsers
<IfModule mod_setenvif.c>
  <IfDefine SSL>
    SetEnvIf User-Agent ".*MSIE.*" \
             nokeepalive ssl-unclean-shutdown \
             downgrade-1.0 force-response-1.0
  </IfDefine>
</IfModule>

# Fix certain PHP values
# (commented out by default to prevent errors occuring on certain
# servers)
#<IfModule mod_php4.c>
#  php_value session.use_trans_sid 0
#  php_value register_globals 1
#</IfModule>

#-- Call time pass reference error ?!
#php_flag  allow_call_time_pass_reference On

#-----------------------------------------
#- SEO Hartmut König
#-----------------------------------------
#-- ! Comment this line, if you get an ERROR 500 !
Options +FollowSymlinks
#RewriteBase /shop

# http://httpd.apache.org/docs/misc/rewriteguide.html
RewriteEngine on

AddType x-mapp-php5 .php
AddHandler x-mapp-php5 .php

rewritecond %{http_host} ^fechtsport-dresden.de [nc]
rewriterule ^(.*)$ http://www.fechtsport-dresden.de/$1 [r=301,nc]

#-- Sitemap
RewriteRule ^sitemap(.*)\.html$ /shop_content.php?coID=8 [qsappend,L]

##-- Kategorien
RewriteCond %{REQUEST_URI} (.*)---([_0-9]+)-([_0-9]+)\.html$
RewriteRule (.*)---([_0-9]+)-([_0-9]+)\.html$ /index.php?cPath=$2&page=$3 [qsappend,L]
RewriteCond %{REQUEST_URI} (.*)---([_0-9]+)\.html$
RewriteRule (.*)---([_0-9]+)\.html$ /index.php?cPath=$2 [qsappend,L]

##-- Produkte
RewriteRule (.*)--(.+)\.html$ /product_info.php?products_id=$2 [qsappend,L]

##-- Content
RewriteRule (.*)-_-([0-9]+)\.html$ /shop_content.php?coID=$2 [qsappend,L]

##-- Manufacturers
RewriteCond %{REQUEST_URI} (.*)---([_0-9]+)-([_0-9]+)\.html$
RewriteRule (.*)---([_0-9]+)-([_0-9]+)\.html$ /index.php?manufacturers_id=$2&page=$3 [qsappend,L]
RewriteCond %{REQUEST_URI} (.*)---([_0-9]+)\.html$
RewriteRule (.*)---([0-9]+)\.html$ /index.php?manufacturers_id=$2 [qsappend,L]

##-- Infocenter
RewriteRule (.*)---([_0-9]+)-([_0-9]+)\.html$ /infocenter.php?cms=$2&page=$3 [qsappend,L]
RewriteRule (.*)---([_0-9]+)\.html$ /infocenter.php?cms=$2 [qsappend,L]


##-- Fehlerseiten auf die Sitemap lotsen
ErrorDocument 400 /sitemap.html?error=400
ErrorDocument 401 /sitemap.html?error=401
ErrorDocument 402 /sitemap.html?error=402
ErrorDocument 403 /sitemap.html?error=403
ErrorDocument 404 /sitemap.html?error=404
ErrorDocument 500 /sitemap.html?error=500
Nach oben
Benutzer-Profile anzeigen Private Nachricht senden Website dieses Benutzers besuchen
admin
Site Admin
Site Admin


Anmeldungsdatum: 13.10.2005
Beiträge: 257

BeitragVerfasst am: 07.01.2010 20:58    Titel:
Hallo,

guter Shop.

Grundsätzlich mal vorweg - die Sprachversionen kommen im Prinzip nur mit der mehrsprachigen ShopStat-Bibliothek in die Sumas. Ich müsste mich arg täuschen, aber so sollten keine anderssprachigen Seiten von Deinem Shop in Google zu finden sein!?
Bei Interesse bitte unter h.koenig@shopstat.com melden.

Das Problem mit den Herstellern liegt am Select-Feld. Hier sollten vielleicht Links oder ähnliches erzeugt werden.

Das Infocenter müsste man halt umschreiben auf Suma-Urls, auch hier bitte bei Interesse unter der Email melden, da ich mir das zuerst anschauen müsste.

Gruss
_________________
Hartmut König

www.shopstat.com
ShopStat | Shopstatistik,Web-Controlling,User-Tracking
Nach oben
Benutzer-Profile anzeigen Private Nachricht senden Website dieses Benutzers besuchen
Neuen Beitrag schreiben   Auf Beitrag antworten    ShopStat Foren-Übersicht // xt:Commerce Alle Zeiten sind GMT + 2 Stunden
Seite 1 von 1

 
Gehen Sie zu:  
Sie können Beiträge in dieses Forum schreiben.
Sie können auf Beiträge in diesem Forum antworten.
Sie können Ihre Beiträge in diesem Forum nicht bearbeiten.
Sie können Ihre Beiträge in diesem Forum nicht löschen.
Sie können an Umfragen in diesem Forum nicht mitmachen.

Powered by phpBB © 2001, 2002 phpBB Group