Hi Leutchen,
ich teste gerade den Einbau des Konfigurators.
Bin durch die Anleitung und Winmerge nur auf ein kleines Problem gestoßen.
Änderung laut Anleitung:
-includes/cart_actions.php
---------------------------------------------------------------------------------------------------
finde folgendes:
case 'add_product' : if (isset ($_POST['products_id']) && is_numeric($_POST['products_id'])) { if ($_POST['products_qty']> MAX_PRODUCTS_QTY
) $_POST['products_qty'] = MAX_PRODUCTS_QTY
; if (is_object($econda)) { $econda->_emptyCart
(); $old_quantity = $_SESSION['cart']->get_quantity(xtc_get_uprid
($_POST['products_id'], $_POST['id'])); $econda->_addProduct
($_POST['products_id'], $_POST['products_qty'], $old_quantity); } $_SESSION['cart']->add_cart((int
) $_POST['products_id'], $_SESSION['cart']->get_quantity(xtc_get_uprid
($_POST['products_id'], $_POST['id'])) + xtc_remove_non_numeric
($_POST['products_qty']), $_POST['id']); } xtc_redirect
(xtc_href_link
($goto, 'products_id=' . (int
) $_POST['products_id'] . '&' . xtc_get_all_get_params
($parameters))); break; und ersetze es mit:
case 'add_product' : if (isset($_POST['products_id'])) { $pids = count($_POST['products_id']); for($i=$pids-1; $i>=0; $i--){ if ($_POST['products_qty'][$i]> MAX_PRODUCTS_QTY
) $_POST['products_qty'][$i] = MAX_PRODUCTS_QTY
; } if (is_object($econda)) { $econda->_emptyCart
(); $old_quantity = $_SESSION['cart']->get_quantity(xtc_get_uprid
($_POST['products_id'][0], $_POST['id'])); $econda->_addProduct
($_POST['products_id'][0], $_POST['products_qty'], $old_quantity); } for($i=$pids-1; $i>=0; $i--){ if ($i == $pids-1) $t_ids = $_POST['id']; else $t_ids = array(); if (isset($_POST['products_qty'])) $_SESSION['cart']->add_cart((int
)$_POST['products_id'][$i], $_SESSION['cart']->get_quantity(xtc_get_uprid
($_POST['products_id'][$i], $t_ids)) + xtc_remove_non_numeric
($_POST['products_qty'][$i]), $t_ids); else $_SESSION['cart']->add_cart((int
)$_POST['products_id'][$i], $_SESSION['cart']->get_quantity(xtc_get_uprid
($_POST['products_id'][$i], $t_ids)) + xtc_remove_non_numeric
($_POST['products_qty_'.$_POST['products_id'][$i]]), $t_ids); } } xtc_redirect
(xtc_href_link
($goto, 'products_id=' . (int
) $_POST['products_id'][0] . '&' . xtc_get_all_get_params
($parameters))); break; Auszug aus meinem Shop:
case 'add_product' : if (isset ($_POST['products_id']) && is_numeric($_POST['products_id'])) { $cart_quantity = xtc_remove_non_numeric
($_POST['products_qty']); if ($cart_quantity> MAX_PRODUCTS_QTY
) $cart_quantity = MAX_PRODUCTS_QTY
; if (is_object($econda)) { $econda->_emptyCart
(); $old_quantity = $_SESSION['cart']->get_quantity(xtc_get_uprid
($_POST['products_id'], $_POST['id'])); $econda->_addProduct
($_POST['products_id'], $cart_quantity, $old_quantity); } $_SESSION['cart']->add_cart((int
) $_POST['products_id'], $_SESSION['cart']->get_quantity(xtc_get_uprid
($_POST['products_id'], $_POST['id'])) + $cart_quantity, $_POST['id']); } xtc_redirect
(xtc_href_link
($goto, 'products_id=' . (int
) $_POST['products_id'] . '&' . xtc_get_all_get_params
($parameters))); break; //EOF - Hetfield - 2009.08.18 - Bugfix for numeric quantitys Das Problem ist nun die Anpassung von Hetfield auf die Anleitung zu übertragen.
Hat jemand da eine Idee?
Danach könnte ich es mal testen.
BTW Das Zusatzmodul Dynamic Description klingt vielversprechend.
Gruß,
Benny
Linkback: https://www.modified-shop.org/forum/index.php?topic=4236.0