Hallo,
danke.
das Formular ist soweit in Ordnung
Der fehlerhafte Shop
Code: Alles auswählen
<form name="buy_now" action="http://www.jura-ersatzteile-shop.de/index.php" method="post">
<input type="hidden" name="action" value="buy_now">
<input type="hidden" name="products_id" value="79">
<input type="hidden" name="mp" value="main">
<input type="hidden" name="file" value="shop">
<input type="hidden" name="cPath" value="25">
<input type="hidden" name="page" value="1" />
<input type="text" name="cart_quantity" value="1" size="3" />
<input type="image" src="themes/osc/images/buttons/deu/buy_now.gif" alt="1 x 'Jura Cafe Creme 500g' bestellen!" border="0" />
</form></td>
der Demo Shop
Code: Alles auswählen
<form name="buy_now" action="http://demo.myoos.de/index.php" method="post">
<input type="hidden" name="action" value="buy_now">
<input type="hidden" name="products_id" value="8">
<input type="hidden" name="mp" value="main">
<input type="hidden" name="file" value="shop">
<input type="hidden" name="cPath" value="3">
<input type="hidden" name="page" value="1" />
<input type="text" name="cart_quantity" value="1" size="3" />
<input type="image" src="themes/oos/images/buttons/deu/buy_now.gif" alt="1 x 'Kochlöffel Silikon Profi Plus' bestellen!" border="0" />
</form></td>
sieht für mich zumindest zurzeit gleich aus.
wenn man das Formular absendet verwendet der Shop
~/shop/includes/oos_cart_actions.php
Code: Alles auswählen
if (DISPLAY_CART == 'true') {
$goto_mp = $aModules['main];
$goto_file = $aFilename['main_shopping_cart];
$parameters = array('action', 'cPath', 'products_id', 'pid');
} else {
$goto_mp = $sMp;
$goto_file = $sFile;
if ($_GET['action] == 'buy_now') {
$parameters = array('action', 'pid', 'products_id', 'cart_quantity');
} elseif ($_POST['action] == 'buy_now') {
$parameters = array('action', 'pid', 'products_id', 'cart_quantity');
} elseif ($_GET['action] == 'buy_slave') {
$parameters = array('action', 'pid', 'slave_id', 'cart_quantity');
} elseif ($_POST['action] == 'buy_slave') {
$parameters = array('action', 'pid', 'slave_id', 'cart_quantity');
} else {
$parameters = array('action', 'pid', 'cart_quantity');
}
}
[code=php]
Hiernach bitte einmal zur Prüfung
[code=php]
echo 'goto_mp=' . $goto_mp . '<br>';
echo 'goto_file=' . $goto_file .<br>';
exit;
eintragen.
es sollte bei einem "in den Warenkorb" legen folges auf dem Monitor stehen.
goto_mp=main
goto_file=shop
wenn nicht, benötige das Ergebnis.
Ab Zeile 242
verarbeitet des Script die Aktion 'buy_now'
und ab Zeile 273
Code: Alles auswählen
} elseif (isset($_POST['products_id]) && is_numeric($_POST['products_id])) {
if (oos_has_product_attributes($_POST['products_id])) {
oos_redirect(oos_link($aModules['products], $aFilename['product_info], 'products_id=' . $_POST['products_id]));
} else {
mit diesem oos_redirect geht der shop bei Produktmerkmalen zur Produktinfoseite.
bitte auf Fehler prüfen.
z.b.
Code: Alles auswählen
} elseif (isset($_POST['products_id]) && is_numeric($_POST['products_id])) {
if (oos_has_product_attributes($_POST['products_id])) {
echo 'Produnktmerkmal';
exit;
oos_redirect(oos_link($aModules['products], $aFilename['product_info], 'products_id=' . $_POST['products_id]));
} else {
Sollte Produnktmerkmal im Brwoserstehen, so bitte melden.
Code: Alles auswählen
if (DECIMAL_CART_QUANTITY == 'true') {
$_POST['cart_quantity] = str_replace(',', '.', $_POST['cart_quantity]);
}
if (isset($_POST['cart_quantity]) && is_numeric($_POST['cart_quantity])) {
$cart_quantity = oos_prepare_input($_POST['cart_quantity]);
$cart_qty = $_SESSION['cart]->get_quantity($_POST['products_id]);
$news_qty = $cart_qty + $cart_quantity;
$products_order_min = oos_get_products_quantity_order_min($_POST['products_id]);
$products_order_units = oos_get_products_quantity_order_units($_POST['products_id]);
if ( ($cart_quantity >= $products_order_min) or ($cart_qty >= $products_order_min) ) {
if ( ($cart_quantity%$products_order_units == 0) and ($news_qty >= $products_order_min) ) {
$_SESSION['cart]->add_cart($_POST['products_id], $news_qty);
} else {
$_SESSION['error_cart_msg] = $aLang['error_products_quantity_order_min_text] . $aLang['error_products_units_invalid] . $cart_quantity . ' - ' . $aLang['products_order_qty_unit_text_info] . ' ' . $products_order_units;
}
} else {
$_SESSION['error_cart_msg] = $aLang['error_products_quantity_order_min_text] . $aLang['error_products_quantity_invalid] . $cart_quantity . ' - ' . $aLang['products_order_qty_min_text_info] . ' ' . $products_order_min;
}
}
In Zeile 301 prüft der Shop ob die Session variable leer ist
$_SESSION['error_cart_msg]
ist die $_SESSION['error_cart_msg] leer?
vor
Code: Alles auswählen
if ($_SESSION['error_cart_msg] == '') {
oos_redirect(oos_link($goto_mp, $goto_file, oos_get_all_post_parameters($parameters), 'NONSSL'));
} else {
oos_redirect(oos_link($aModules['products], $aFilename['product_info], 'products_id=' . $_POST['products_id]));
}
}
}
eintragen.
Es sollte
end
nur im Browser angezigt werden.
beendet in diesem Debug Weg PHP, daher bitte vor jedem neuen Schritt, die alten Test-Erweiterungen
löschen.
Gruß
ralf