Moin,
beim Einbau des Moduls für 1.06, angepasst von
astaller und tomcraft , verabschiedet sich der Shop mit einer weißen Seite nach URL Aufruf. Ebenso, wenn ich über die login_admin.php gehe. Ursache ist hier die "shopping_cart.php" im Templateordner.
Mein Shop: modified v1.06 SP2 mit Template mobiluzer ab 1.06 (schattenspiele_res)
Der zweite Abschnitt in der Anleitung für die -
/templates/meinshop/source/boxes/shopping_cart.php - verursacht den Ausstieg. Anbei der entsprechende php-Code:
SUCHEN NACH:
$box_smarty->assign('UST', $_SESSION['cart']->show_tax());
DANACH EINFÜGEN:
// BOF - astaller - 2013-10-15 - Kostenloser Versand für Artikel
// get all free products
$free_shipping_products_query = "SELECT products_id, max_free_shipping_amount FROM ".TABLE_PRODUCTS." WHERE free_shipping ='1';";
$free_shipping_products_query = xtDBquery($free_shipping_products_query);
$free_contents = 0;
$free_amount = true;
$free_shipping_box_cart = false;
while ($free_shipping_products = xtc_db_fetch_array($free_shipping_products_query)) {
// check if product is in cart
$products_id_fs = $_SESSION['cart']->in_cart_fs($free_shipping_products['products_id']);
if ($products_id_fs) {
// if in_cart -> get ammount of this product in_cart and add it to the free-products counter
$free_contents += $_SESSION['cart']->get_quantity_fs($products_id_fs);
// check if ammount of product is free
if (($free_shipping_products['max_free_shipping_amount'] >0)&&($_SESSION['cart']->get_quantity_fs($products_id_fs) > $free_shipping_products['max_free_shipping_amount'])) {
$free_amount = false;
}
}
}
// decide if shipping is free
if (($free_contents > 0) && ($free_contents == $_SESSION['cart']->count_contents()) && ($free_amount == true)) {
$free_shipping_box_cart = true;
}
// EOF - astaller - 2013-10-15 - Kostenloser Versand für Artikel
WEITERSUCHEN NACH:
$box_smarty->assign('SHIPPING_INFO', SHOW_SHIPPING == 'true' ? $main->getShippingLink() : '');
}
ERSETZEN MIT:
// BOF - astaller - 2013-10-15 - Kostenloser Versand für Artikel
/* ORIGINAL
$box_smarty->assign('SHIPPING_INFO', SHOW_SHIPPING == 'true' ? $main->getShippingLink() : '');
}
*/
if ((SHOW_SHIPPING == 'true') && ($free_shipping_box_cart != true)) {
$box_smarty->assign('SHIPPING_INFO', SHOW_SHIPPING == 'true' ? $main->getShippingLink() : '');
}
}
// EOF - astaller - 2013-10-15 - Kostenloser Versand für Artikel
Der gesuchte zweite Abschnitt ist in meiner shopping_cart.php nicht enthalten, habe deswegen nur den ersten Teil erstmal eingebaut, weil dieser keine Probleme verursacht.
Kann von Euch jemand behilflich sein und helfen?? Hier noch meine Teilangepasste "shopping_cart.php" habe einen
// Hinweis... gesetzt zum schnelleren finden.
<?php/* -----------------------------------------------------------------------------------------
$Id: shopping_cart.php 1281 2005-10-03 09:30:17Z 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(shopping_cart.php,v 1.18 2003/02/10); www.oscommerce.com
(c) 2003 nextcommerce (shopping_cart.php,v 1.15 2003/08/17); www.nextcommerce.org
Released under the GNU General Public License
---------------------------------------------------------------------------------------*/$box_smarty = new smarty
;$box_smarty->assign('tpl_path', 'templates/'.CURRENT_TEMPLATE
.'/');$box_content = '';$box_price_string = '';$products_in_cart = array (); //DokuMan - 2010-02-28 - Undefined variable: products_in_cart$qty = 0; //DokuMan - 2010-02-28 - Undefined variable: qty// include needed filesrequire_once (DIR_FS_INC
.'xtc_recalculate_price.inc.php');if (strstr($PHP_SELF, FILENAME_CHECKOUT_PAYMENT
) or
strstr($PHP_SELF, FILENAME_CHECKOUT_CONFIRMATION
) or
strstr($PHP_SELF, FILENAME_CHECKOUT_SHIPPING
)) $box_smarty->assign('deny_cart', 'true');if ($_SESSION['cart']->count_contents() > 0) { $products = $_SESSION['cart']->get_products(); //$products_in_cart = array (); //DokuMan - 2010-02-28 - Undefined variable: products_in_cart //$qty = 0; //DokuMan - 2010-02-28 - Undefined variable: qty for ($i = 0, $n = sizeof($products); $i < $n; $i ++) { $qty += $products[$i]['quantity']; $products_in_cart[] = array ('QTY' => $products[$i]['quantity'], 'LINK' => xtc_href_link
(FILENAME_PRODUCT_INFO
, xtc_product_link
($products[$i]['id'],$products[$i]['name'])), 'NAME' => $products[$i]['name']); } $box_smarty->assign('PRODUCTS', $qty); $box_smarty->assign('empty', 'false');} else { // cart empty $box_smarty->assign('empty', 'true');}if ($_SESSION['cart']->count_contents() > 0) { $total =$_SESSION['cart']->show_total(); $discount = 0; //DokuMan - 2010-03-01 - set undefined variableif ($_SESSION['customers_status']['customers_status_ot_discount_flag'] == '1' && $_SESSION['customers_status']['customers_status_ot_discount'] != '0.00') { if ($_SESSION['customers_status']['customers_status_show_price_tax'] == 0 && $_SESSION['customers_status']['customers_status_add_tax_ot'] == 1) { $price = $total-$_SESSION['cart']->show_tax(false); } else { $price = $total; } $discount = $xtPrice->xtcGetDC($price, $_SESSION['customers_status']['customers_status_ot_discount']); $box_smarty->assign('DISCOUNT', $xtPrice->xtcFormat(($discount * (-1)), $price_special = 1, $calculate_currencies = false)); }if ($_SESSION['customers_status']['customers_status_show_price'] == '1') { if ($_SESSION['customers_status']['customers_status_show_price_tax'] == 0 && $_SESSION['customers_status']['customers_status_add_tax_ot'] == 0) $total-=$discount; if ($_SESSION['customers_status']['customers_status_show_price_tax'] == 0 && $_SESSION['customers_status']['customers_status_add_tax_ot'] == 1) $total-=$discount; if ($_SESSION['customers_status']['customers_status_show_price_tax'] == 1) $total-=$discount; $box_smarty->assign('TOTAL', $xtPrice->xtcFormat($total, true));} $box_smarty->assign('UST', $_SESSION['cart']->show_tax()); // BOF - astaller - 2013-10-15 - Kostenloser Versand für Artikel // get all free products $free_shipping_products_query = "SELECT products_id, max_free_shipping_amount FROM ".TABLE_PRODUCTS
." WHERE free_shipping ='1';"; $free_shipping_products_query = xtDBquery
($free_shipping_products_query); $free_contents = 0; $free_amount = true; $free_shipping_box_cart = false; while ($free_shipping_products = xtc_db_fetch_array
($free_shipping_products_query)) { // check if product is in cart $products_id_fs = $_SESSION['cart']->in_cart_fs($free_shipping_products['products_id']); if ($products_id_fs) { // if in_cart -> get ammount of this product in_cart and add it to the free-products counter $free_contents += $_SESSION['cart']->get_quantity_fs($products_id_fs); // check if ammount of product is free if (($free_shipping_products['max_free_shipping_amount'] >0)&&($_SESSION['cart']->get_quantity_fs($products_id_fs) > $free_shipping_products['max_free_shipping_amount'])) { $free_amount = false; } } } // decide if shipping is free if (($free_contents > 0) && ($free_contents == $_SESSION['cart']->count_contents()) && ($free_amount == true)) { $free_shipping_box_cart = true; }// EOF - astaller - 2013-10-15 - Kostenloser Versand für Artikel// Hinweis hier gehts nicht weiter mit dem restlichen Code von astaller if (SHOW_SHIPPING
=='true') { //BOF - DokuMan - 2009-08-09 - fixed wrong quotationmark position and fixed wrong question mark on KeepThis=true //$box_smarty->assign('SHIPPING_INFO',' '.SHIPPING_EXCL.'<a target="_blank" href="'.xtc_href_link(FILENAME_POPUP_CONTENT, 'coID='.SHIPPING_INFOS.'?KeepThis=true&TB_iframe=true&height=400&width=600"').' title="Information" class="thickbox"">'.SHIPPING_COSTS.'</a>'); $box_smarty->assign('SHIPPING_INFO',' '.SHIPPING_EXCL
.' <a target="_blank" href="'.xtc_href_link
(FILENAME_POPUP_CONTENT
, 'coID='.SHIPPING_INFOS
.'&KeepThis=true&TB_iframe=true&height=400&width=600', 'SSL').'" title="Information" class="thickbox">'.SHIPPING_COSTS
.'</a>'); //EOF - DokuMan - 2009-08-09 - fixed wrong quotationmark position and fixed wrong question mark on KeepThis=true }}if (ACTIVATE_GIFT_SYSTEM
== 'true') { $box_smarty->assign('ACTIVATE_GIFT', 'true');}// GV Code Startif (isset ($_SESSION['customer_id'])) { $gv_query = xtc_db_query
("select amount from ".TABLE_COUPON_GV_CUSTOMER
." where customer_id = '".$_SESSION['customer_id']."'"); $gv_result = xtc_db_fetch_array
($gv_query); if ($gv_result['amount'] > 0) { $box_smarty->assign('GV_AMOUNT', $xtPrice->xtcFormat($gv_result['amount'], true, 0, true)); $box_smarty->assign('GV_SEND_TO_FRIEND_LINK', '<a href="'.xtc_href_link
(FILENAME_GV_SEND
).'">'); }}if (isset ($_SESSION['gv_id'])) { $gv_query = xtc_db_query
("select coupon_amount from ".TABLE_COUPONS
." where coupon_id = '".$_SESSION['gv_id']."'"); $coupon = xtc_db_fetch_array
($gv_query); $box_smarty->assign('COUPON_AMOUNT2', $xtPrice->xtcFormat($coupon['coupon_amount'], true, 0, true));}if (isset ($_SESSION['cc_id'])) { $box_smarty->assign('COUPON_HELP_LINK', '<a href="javascript:popupWindow(\''.xtc_href_link
(FILENAME_POPUP_COUPON_HELP
, 'cID='.$_SESSION['cc_id']).'\')">');}// GV Code End$box_smarty->assign('LINK_CART', xtc_href_link
(FILENAME_SHOPPING_CART
, '', 'SSL'));$box_smarty->assign('products', $products_in_cart);$box_smarty->caching = 0;$box_smarty->assign('language', $_SESSION['language']);$box_shopping_cart = $box_smarty->fetch(CURRENT_TEMPLATE
.'/boxes/box_cart.html');$smarty->assign('box_CART', $box_shopping_cart);?>