|
|||
|
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']));
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);
Code:
{$module_data.BUTTON_BUY_NOW}
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? |
![]() |
| Lesezeichen |
| Stichworte |
| angebotsliste, jetzt kaufenbutton |
| Themen-Optionen | |
| Ansicht | |
|
|