Hallo Goldrunner,
hier mal was zu den Kategorien.
In der /includes/classes/shopping_cart.php in Z.375 das:
$products_query = xtc_db_query("select p.products_id, pd.products_name,p.products_shippingtime, p.products_image, p.products_model, p.products_price, p.products_discount_allowed, p.products_weight, p.products_tax_class_id from ".TABLE_PRODUCTS." p, ".TABLE_PRODUCTS_DESCRIPTION." pd where p.products_id='".xtc_get_prid($products_id)."' and pd.products_id = p.products_id and pd.language_id = '".$_SESSION['languages_id']."'");
ändern in:
$products_query = xtc_db_query("select p.products_id, pd.products_name,p.products_shippingtime, p.products_image, p.products_model, p.products_price, p.products_discount_allowed, p.products_weight, p.products_tax_class_id from, ptc.categories_id ".TABLE_PRODUCTS." p, ".TABLE_PRODUCTS_DESCRIPTION." pd, ".TABLE_PRODUCTS_TO CATEGORIES." ptc where p.products_id='".xtc_get_prid($products_id)."' and pd.products_id = p.products_id and ptc.products_id = p.products_id and pd.language_id = '".$_SESSION['languages_id']."'");
Dann in Z. 391 das ändern:
'attributes' => $this->contents[$products_id]['attributes']
in das:
'attributes' => $this->contents[$products_id]['attributes'],
'category' => $products['categories_id']
Dann in /inc/ eine neue Datei erstellen mit dem Namen xtc_get_category_name.inc.php und dem Inhalt:
<?php
/* -----------------------------------------------------------------------------------------
$Id: xtc_get_category_name.inc.php 1009 2005-07-11 16:19:29Z mz $
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) 2003 XT-Commerce
-----------------------------------------------------------------------------------------
based on:
(c) 2000-2001 The Exchange Project (earlier name of osCommerce)
(c) 2002-2003 osCommerce(general.php,v 1.225 2003/05/29); www.oscommerce.com
(c) 2003 nextcommerce (xtc_get_categories.inc.php,v 1.3 2003/08/13); www.nextcommerce.org
Released under the GNU General Public License
---------------------------------------------------------------------------------------*/
function xtc_get_category_name($categories_id) {
$categories_query = "SELECT
cd.categories_name
FROM " . TABLE_CATEGORIES_DESCRIPTION . " cd
WHERE cd.categories_id = " . $categories_id . "
AND cd.language_id = '" . $_SESSION['languages_id'] . "'";
$categories_query = xtDBquery($categories_query);
$categories = xtc_db_fetch_array($categories_query,true);
return $categories['categories_name'];
}
?>
Dann in der /includes/modules/order_details_cart.php in Z.40 nach dem:
require_once (DIR_FS_INC.'xtc_get_attributes_model.inc.php');
das einfügen:
require_once (DIR_FS_INC.'xtc_get_category_name.inc.php');
und in Z.87 das ändern
'ATTRIBUTES' => '');
in das:
'ATTRIBUTES' => '',
'PRODUCTS_CATEGORY' => xtc_get_category_name($products[$i]['category'])
);
Dann im Template /templates/xtc5/module/order_details.html in Z.21 das ändern:
<strong><a href="{$module_data.PRODUCTS_LINK}">{$module_data.PRODUCTS_NAME}</a></strong>
in das:
<strong><a href="{$module_data.PRODUCTS_LINK}">{$module_data.PRODUCTS_NAME} - {$module_data.PRODUCTS_CATEGORY}</a></strong>
Dann sollte eine Kategorie angezeigt werden. Bitte erst am Testshop ausprobieren da nicht von mir getestet.
![icon_smilenew :)](https://www.modified-shop.org/forum/Smileys/greensmilies/icon_smilenew.gif.pagespeed.ce.o4y9S19pKd.gif)
Viele Grüße
Franky