#1 (permalink)  
Alt 27.01.2006, 06:23
Neuer Benutzer
 
Registriert seit: 04.12.2005
Beiträge: 23
Daumen hoch

Hallo, mu? mal wieder was erfragen.

Ich m?chte auf der product_info ein weiteres textfeld rechts neben dem Bild einf?gen da ich noch weitere Informationen hinzuf?gen mu?. Dies wollte ich nun mite der Kurzbeschreibung erreichen.

Problem:

Wie bekomme ich diese auf die product_info? {$module_data.PRODUCTS_SHORT_DESCRIPTION} habe ich eingetragen, aber es wird nichts angezeigt. Eine Seite zuvor im productlisting ist die Kurzbeschreibung aber zu sehen.
Gehe jetzt mal davon aus, da? der Modulbefehl nicht f?r die product_info geeignet ist.

Wie konn ich nun die Kurzbeschreibung in die product_info integrieren?

Dank an alle?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!
Mit Zitat antworten
  #2 (permalink)  
Alt 27.01.2006, 11:29
nom nom ist offline
 
Registriert seit: 19.02.2004
Beiträge: 596
Standard

Hallo,

du muss die SQL-Abfrage um das Feld erg?nzen.

Nach Zeile 40 pd.products_description, f?ge dies ein:

Code:
pd.products_short_description,
Nach Zeile 121:
Code:
$info_smarty->assign('PRODUCTS_SHORT_DESCRIPTION',stripslashes($product_info['products_short_description']));
Variable im Template lautet dann:
Code:
{$PRODUCTS_SHORT_DESCRIPTION}
Gru?
nom
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!
Mit Zitat antworten
  #3 (permalink)  
Alt 29.01.2006, 08:26
Neuer Benutzer
 
Registriert seit: 04.12.2005
Beiträge: 23
Böse

Danke f?r die schnelle Hilfe.

Aber wo in welcher datei mu? ich die SQL Abfrage ?ndern. Arbeite mit phpMyAdmin Database Manager Version 2.5.4 und PHP Information Version 4.3.4

Sorry, aber da hab ich gar keine Ahnung.

Gru?
Axel
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!
Mit Zitat antworten
  #4 (permalink)  
Alt 18.10.2006, 13:06
Benutzer
 
Registriert seit: 30.09.2006
Ort: Mannheim
Beiträge: 50
Reden bitte schön

hier bei meinen beispiel wird beschreibung zu kurz beschreibung bei der startseite

Code:
$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';

if ((!isset ($new_products_category_id)) || ($new_products_category_id == '0')) {
	if (GROUP_CHECK == 'true')
		$group_check = " and p.group_permission_".$_SESSION['customers_status']['customers_status_id']."=1 ";

	$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 (GROUP_CHECK == 'true')
		$group_check = "and p.group_permission_".$_SESSION['customers_status']['customers_status_id']."=1 ";

	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_short_description." pd,
	                                        ".TABLE_PRODUCTS_TO_CATEGORIES." p2c,
	                                        ".TABLE_CATEGORIES." c
	                                        where c.categories_status='1'
	                                        and p.products_id = p2c.products_id and p.products_id=pd.products_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 ();
$new_products_query = xtDBquery($new_products_query);
while ($new_products = xtc_db_fetch_array($new_products_query, true)) {
	$SEF_parameter = '';
	if (SEARCH_ENGINE_FRIENDLY_URLS == 'true')
		$SEF_parameter = '&product='.xtc_cleanName($new_products['products_name']);

	if ($_SESSION['customers_status']['customers_status_show_price'] != '0') {
		$buy_now = '';
		if ($_SESSION['customers_status']['customers_fsk18'] == '1') {
			if ($new_products['products_fsk18'] == '0')
				$buy_now = '<a href="'.xtc_href_link(basename($PHP_SELF), 'action=buy_now&BUYproducts_id='.$new_products['products_id'].'&'.xtc_get_all_get_params(array ('action')), 'NONSSL').'">'.xtc_image_button('button_buy_now.gif', TEXT_BUY.$new_products['products_name'].TEXT_NOW).'</a>';
		} else {
			$buy_now = '<a href="'.xtc_href_link(basename($PHP_SELF), 'action=buy_now&BUYproducts_id='.$new_products['products_id'].'&'.xtc_get_all_get_params(array ('action')), 'NONSSL').'">'.xtc_image_button('button_buy_now.gif', TEXT_BUY.$new_products['products_name'].TEXT_NOW).'</a>';
		}
		
		$tax_rate = $xtPrice->TAX[$new_products['products_tax_class_id']];
		if ($tax_rate > 0 && $_SESSION['customers_status']['customers_status_show_price_tax'] != 0) {
		    $tax_info = sprintf(TAX_INFO_INCL, $tax_rate.' %');
		}
		if ($tax_rate > 0 && $_SESSION['customers_status']['customers_status_show_price_tax'] == 0) {
		    $tax_info = sprintf(TAX_INFO_EXCL, $tax_rate.' %');
		}
		
		$image = '';
		if ($new_products['products_image'] != '') {
			$image = DIR_WS_THUMBNAIL_IMAGES.$new_products['products_image'];
		}
$ship_info="";
		if (SHOW_SHIPPING=='true') {
			$ship_info= ' '.SHIPPING_EXCL.'<a href="javascript:newWin=void(window.open(\''.xtc_href_link(FILENAME_POPUP_CONTENT, 'coID='.SHIPPING_INFOS).'\', \'popup\', \'toolbar=0, width=640, height=600\'))"> '.SHIPPING_COSTS.'</a>';
		} 

		$module_content[] = array ('PRODUCTS_NAME' => $new_products['products_name'], 
								   'PRODUCTS_DESCRIPTION' => $new_products['products_short_description'], 
								   'PRODUCTS_PRICE' => $xtPrice->xtcGetPrice($new_products['products_id'], $format = true, 1, $new_products['products_tax_class_id'], $new_products['products_price']), 
								   'PRODUCTS_TAX_INFO' => $tax_info,
								   'PRODUCTS_SHIPPING_LINK' => $ship_info,
								   'PRODUCTS_LINK' => xtc_href_link(FILENAME_PRODUCT_INFO, xtc_product_link($new_products['products_id'],$new_products['products_name'])), 
								   'PRODUCTS_IMAGE' => $image, 
								   'BUTTON_BUY_NOW' => $buy_now);

	} else {

		$image = '';
		if ($new_products['products_image'] != '')
			$image = DIR_WS_THUMBNAIL_IMAGES.$new_products['products_image'];
	
		$module_content[] = array ('PRODUCTS_NAME' => $new_products['products_name'], 
								   'PRODUCTS_DESCRIPTION' => $new_products['products_short_description'], 
								   'PRODUCTS_PRICE' => $xtPrice->xtcGetPrice($new_products['products_id'], $format = true, 1, $new_products['products_tax_class_id'], $new_products['products_price']), 
								   'PRODUCTS_LINK' => xtc_href_link(FILENAME_PRODUCT_INFO, xtc_product_link($new_products['products_id'],$new_products['products_name'])), 
								   'PRODUCTS_IMAGE' => $image);
	}
	$row ++;

}
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);
}
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!
Mit Zitat antworten
  #5 (permalink)  
Alt 19.10.2006, 02:09
Neuer Benutzer
 
Registriert seit: 20.11.2005
Beiträge: 11
Standard

Zitat:
Zitat von xirlexa
Danke f?r die schnelle Hilfe.

Aber wo in welcher datei mu? ich die SQL Abfrage ?ndern. Arbeite mit phpMyAdmin Database Manager Version 2.5.4 und PHP Information Version 4.3.4

Sorry, aber da hab ich gar keine Ahnung.

Gru?
Axel
in /includes/modules/product_info.php

nach $info_smarty->assign('PRODUCTS_DESCRIPTION', stripslashes($product->data['products_description']));

einfügen:
PHP-Code:
$info_smarty->assign('PRODUCTS_SHORT_DESCRIPTION'$product->data['products_short_description']); 
in /templates/schwarz-rot/module/product_info/product_info_v1.html
an beliebiger Stelle einfügen:

PHP-Code:
{if $PRODUCTS_SHORT_DESCRIPTION!=''}{$PRODUCTS_SHORT_DESCRIPTION}<br />{/if} 
bei mir klappt's
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!
Mit Zitat antworten
Antwort

Lesezeichen

Stichworte
productinfo, productshortdescription

Themen-Optionen
Ansicht

Forumregeln
Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are aus
Pingbacks are aus
Refbacks are aus



Alle Zeitangaben in WEZ +1. Es ist jetzt 00:53 Uhr.

Copyright © 2011 xt:Commerce GmbH / xt:Commerce International Ltd. - All Rights Reserved

xt:Commerce is a SafeCharge brand