#1 (permalink)  
Alt 09.03.2006, 20:45
Erfahrener Benutzer
 
Registriert seit: 22.02.2006
Beiträge: 120
Standard

Irgendwie scheint xtCommerce 3.04 keinen "Jetzt Kaufen!"-Button bei den "Angeboten" (specials) vorzusehen.

Nur mit ?nderungen am Template habe ich zumindest keinen zustandegebracht. Inzwischen hab ich mir mit einer ?nderung an der "specials.php" geholfen:

Original-Code aus der "specials.php" im Hauptverzeichnis, Zeile 62 bis 81:
Code:
	if ($_SESSION['customers_status']['customers_status_show_price'] != 0) {
 	$tax_rate = $xtPrice->TAX[$specials['products_tax_class_id']];
 	// price incl tax
 	if ($tax_rate > 0 && $_SESSION['customers_status']['customers_status_show_price_tax'] != 0) {
  $tax_info = sprintf(TAX_INFO_INCL, $tax_rate.' %');
 	} 
 	// excl tax + tax at checkout
 	if ($tax_rate > 0 && $_SESSION['customers_status']['customers_status_show_price_tax'] == 0 && $_SESSION['customers_status']['customers_status_add_tax_ot'] == 1) {
  $tax_info = sprintf(TAX_INFO_ADD, $tax_rate.' %');
 	}
 	// excl tax
 	if ($tax_rate > 0 && $_SESSION['customers_status']['customers_status_show_price_tax'] == 0 && $_SESSION['customers_status']['customers_status_add_tax_ot'] == 0) {
  $tax_info = sprintf(TAX_INFO_EXCL, $tax_rate.' %');
 	}
 }
 $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_ID' => $specials['products_id'], 'PRODUCTS_NAME' => $specials['products_name'],'PRODUCTS_SHIPPING_LINK' => $ship_info,'PRODUCTS_TAX_INFO' => $tax_info, 'PRODUCTS_PRICE' => $products_price, 'PRODUCTS_LINK' => xtc_href_link(FILENAME_PRODUCT_INFO, xtc_product_link($specials['products_id'], $specials['products_name'])), 'PRODUCTS_IMAGE' => $image, 'PRODUCTS_SHORT_DESCRIPTION' => xtc_get_short_description($specials['products_id']));
Ich hab das Ganze jetzt folgenderma?en modifiziert:

Code:
	if ($_SESSION['customers_status']['customers_status_show_price'] != 0) {
 	$tax_rate = $xtPrice->TAX[$specials['products_tax_class_id']];
 	// NEU!!
 	$buy_now = '<a href="'.xtc_href_link(basename($PHP_SELF), 'action=buy_now&BUYproducts_id='.$specials['products_id'].'&'.xtc_get_all_get_params(array ('action')), 'NONSSL').'">'.xtc_image_button('button_buy_now.gif', TEXT_BUY.$specials['products_name'].TEXT_NOW).'</a>';
 	// price incl tax
 	if ($tax_rate > 0 && $_SESSION['customers_status']['customers_status_show_price_tax'] != 0) {
  $tax_info = sprintf(TAX_INFO_INCL, $tax_rate.' %');
 	} 
 	// excl tax + tax at checkout
 	if ($tax_rate > 0 && $_SESSION['customers_status']['customers_status_show_price_tax'] == 0 && $_SESSION['customers_status']['customers_status_add_tax_ot'] == 1) {
  $tax_info = sprintf(TAX_INFO_ADD, $tax_rate.' %');
 	}
 	// excl tax
 	if ($tax_rate > 0 && $_SESSION['customers_status']['customers_status_show_price_tax'] == 0 && $_SESSION['customers_status']['customers_status_add_tax_ot'] == 0) {
  $tax_info = sprintf(TAX_INFO_EXCL, $tax_rate.' %');
 	}
 }
 $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_ID' => $specials['products_id'], 
   'PRODUCTS_NAME' => $specials['products_name'], 
   'PRODUCTS_SHIPPING_LINK' => $ship_info, 
   'PRODUCTS_TAX_INFO' => $tax_info, 
   'PRODUCTS_PRICE' => $products_price, 
   'PRODUCTS_LINK' => xtc_href_link(FILENAME_PRODUCT_INFO, xtc_product_link($specials['products_id'], $specials['products_name'])), 
   'PRODUCTS_IMAGE' => $image, 
   'PRODUCTS_SHORT_DESCRIPTION' => xtc_get_short_description($specials['products_id']), 
   'BUTTON_BUY_NOW' => $buy_now);
Jetzt kann man in der "specials.html" (im Template-Ordner "module") durch
Code:
{$module_data.BUTTON_BUY_NOW}
einen "Jetzt Kaufen!"-Button anzeigen lassen.

Da ich in xtCommerce noch nicht sehr erfahren bin (erster Shop), bin ich nicht sicher, ob ich mit so einer Ver?nderung nicht evtl. irgendetwas "anrichte". Bei meinem Testsystem konnte ich bisher zwar keine Fehlfunktionen feststellen, aber da sind auch nicht sehr viele Artikel drin.

Mich w?rden Meinungen von erfahreneren Usern interessieren...

Am liebsten w?re mir allerdings immer noch eine M?glichkeit, einen "Jetzt Kaufen!"-Button ohne ?nderungen am System (also nur im Template) hinzukriegen. Geht das irgendwie?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!
Mit Zitat antworten
Antwort

Lesezeichen

Stichworte
angebotsliste, jetzt kaufenbutton

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:31 Uhr.

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

xt:Commerce is a SafeCharge brand