Jump to content
xt:Commerce Community Forum

XT Commerce-Wie Metas für Kategorie der 3.ten Ebene einfügen


darkeye78

Recommended Posts

Hallo,

ich habe einen Xt Commerce Shop und alle Kategorien und Produktseiten sind für Sumas optimiert. Doch ich kann nicht die Kategorien der dritten Ebene (Kategorie 1/Kategorie 2/Kategorie 3) bearbeiten, was die Metas angeht.. also Title Tag, Description Tag und Keyword Tag. Aktuell erscheinen dort die gleichen Metas der übergeordneten Kategorie.

Im Adminbereich kann ich eingeben was ich will, das Script übernimmt die Änderungen nicht.

Kann mir einer sagen wie ich dort die Metas bearbeiten kann?

Muss dazu evtl die metags.php bearbeitet werden? Ich poste mal hier den aktuellen Code:

metatags.php:

<?php


/* -----------------------------------------------------------------------------------------

   $Id: metatags.php,v 1.1 2009-09-03 15:13:41 arichter Exp $


   XT-Commerce - community made shopping

   http://www.xt-commerce.com


   Copyright (c) 2003 XT-Commerce

   -----------------------------------------------------------------------------------------

   based on:

   (c) 2003	 nextcommerce (metatags.php,v 1.7 2003/08/14); www.nextcommerce.org


   Released under the GNU General Public License

   ---------------------------------------------------------------------------------------*/

?>

<meta name="robots" content="<?php echo META_ROBOTS; ?>" />

<meta name="language" content="<?php echo $_SESSION['language_code']; ?>" />

<meta name="author" content="<?php echo META_AUTHOR; ?>" />

<meta name="publisher" content="<?php echo META_PUBLISHER; ?>" />

<meta name="company" content="<?php echo META_COMPANY; ?>" />

<meta name="page-topic" content="<?php echo META_TOPIC; ?>" />

<meta name="reply-to" content="<?php echo META_REPLY_TO; ?>" />

<meta name="distribution" content="global" />

<meta name="revisit-after" content="<?php echo META_REVISIT_AFTER; ?>" />

<?php


if (strstr($PHP_SELF, FILENAME_PRODUCT_INFO)) {


	if ($product->isProduct()) {

?>

<meta name="description" content="<?php echo $product->data['products_meta_description']; ?>" />

<meta name="keywords" content="<?php echo $product->data['products_meta_keywords']; ?>" />

<title><?php echo $product->data['products_name'].' - '.TITLE; ?></title>

	<?php


	} 



	// Anfang seo-geek.de Modifikation

elseif($_GET['manufacturers_id'])

{

$manufacturers_meta_query = xtDBquery("SELECT manufacturers_meta_title, manufacturers_meta_description, manufacturers_meta_keywords FROM

" . TABLE_MANUFACTURERS_INFO. "

WHERE

manufacturers_id ='". $_GET['manufacturers_id'] ."' AND

languages_id='" . $_SESSION['languages_id'] . "'");

$manufacturers_data = xtc_db_fetch_array($manufacturers_meta_query,true);

?>

<meta name="description" content="<?php echo $manufacturers_data['manufacturers_meta_description']; ?>" />

<meta name="keywords" content="<?php echo $manufacturers_data['manufacturers_meta_keywords'];?>" />

<meta name="page-topic" content="<?php echo META_TOPIC; ?>" />

<title><?php echo $manufacturers_data['manufacturers_meta_title'];?></title>

<?

}

// Ende seo-geek.de Modifikation




	else {

?>

<meta name="description" content="<?php echo META_DESCRIPTION; ?>" />

<meta name="keywords" content="<?php echo META_KEYWORDS; ?>" />

<title><?php echo TITLE; ?></title>

	<?php


	}





} else {

	if ($_GET['cPath']) {

		if (strpos($_GET['cPath'], '_') == '1') {

			$arr = explode('_', xtc_input_validation($_GET['cPath'], 'cPath', ''));

			$_cPath = $arr[1];

		} else {

			$_cPath=(int)$_GET['cPath'];

			if (isset ($_GET['cat'])) {

				$site = explode('_', $_GET['cat']);

				$cID = $site[0];

				$_cPath = str_replace('c', '', $cID);

			}

		}

		$categories_meta_query = xtDBquery("SELECT categories_meta_keywords,

		                                            categories_meta_description,

		                                            categories_meta_title,

		                                            categories_name

		                                            FROM " . TABLE_CATEGORIES_DESCRIPTION . "

		                                            WHERE categories_id='" . $_cPath . "' and

		                                            language_id='" . $_SESSION['languages_id'] . "'");

		$categories_meta = xtc_db_fetch_array($categories_meta_query, true);

		if ($categories_meta['categories_meta_keywords'] == '') {

			$categories_meta['categories_meta_keywords'] = META_KEYWORDS;

		}

		if ($categories_meta['categories_meta_description'] == '') {

			$categories_meta['categories_meta_description'] = META_DESCRIPTION;

		}

		if ($categories_meta['categories_meta_title'] == '') {

			$categories_meta['categories_meta_title'] = $categories_meta['categories_name'];

		}

?>

<meta name="description" content="<?php echo $categories_meta['categories_meta_description']; ?>" />

<meta name="keywords" content="<?php echo $categories_meta['categories_meta_keywords']; ?>" />

<title><?php echo $categories_meta['categories_meta_title'].' - '.TITLE; ?></title>

<?php


	} else {

		if ($_GET['coID']) {

			$contents_meta_query = xtDBquery("SELECT content_heading

			                                            FROM " . TABLE_CONTENT_MANAGER . "

			                                            WHERE content_group='" . $_GET['coID'] . "' and

			                                            languages_id='" . $_SESSION['languages_id'] . "'");

			$contents_meta = xtc_db_fetch_array($contents_meta_query, true);

?>

<meta name="description" content="<?php echo META_DESCRIPTION; ?>" />

<meta name="keywords" content="<?php echo META_KEYWORDS; ?>" />

<title><?php echo $contents_meta['content_heading'].' - '.TITLE; ?></title>

<?php


		} else {

?>

<meta name="description" content="<?php echo META_DESCRIPTION; ?>" />

<meta name="keywords" content="<?php echo META_KEYWORDS; ?>" />

<title>Onlineshop Startseite  <?php echo TITLE; ?></title>

<?php


		}

	}

}

?>

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
  • Create New...