fauer Posted March 30, 2004 Report Share Posted March 30, 2004 Was muss ich in der produkt_listing.php ?ndern, damit ich gleich bei der Auflistung der Produkte die Menge, die ich kaufen m?chte eingeben kann? Link to comment Share on other sites More sharing options...
Chrysler Posted March 30, 2004 Report Share Posted March 30, 2004 dann musst du halt ein Mengenfeld in der <form> mit einbinden. Wie das geht kannst Du dir im Quellcode der Product_info abgucken. Link to comment Share on other sites More sharing options...
fauer Posted March 30, 2004 Author Report Share Posted March 30, 2004 ok, das inputfeld zeigt er mir jetzt, doch dann ?bernimmt es nicht den wert, den ich in das feld schreibe... hier der ge?nderte code... if ($_SESSION['customers_status']['customers_status_show_price'] != '0') { $price=xtc_get_products_price($listing['products_id'], $price_special=1, $quantity=1); $buy_now='<a href="' . xtc_href_link(basename($PHP_SELF), xtc_get_all_get_params(array('action')) . 'action=buy_now&BUYproducts_id=' . $listing['products_id'], 'NONSSL') . '">' . xtc_draw_input_field('products_qty', '1','size="3"') . xtc_image_button('button_buy_now.gif', TEXT_BUY . $listing['products_name'] . TEXT_NOW); } Link to comment Share on other sites More sharing options...
mzanier Posted March 30, 2004 Report Share Posted March 30, 2004 buy_now function in der application_top f?r das mengenfeld erweitern. Link to comment Share on other sites More sharing options...
fauer Posted March 31, 2004 Author Report Share Posted March 31, 2004 du meinst sicher diesen ausschnitt: // performed by the 'buy now' button in product listings and review page case 'buy_now': if (isset($_GET['BUYproducts_id'])) { if (xtc_has_product_attributes($_GET['BUYproducts_id'])) { xtc_redirect(xtc_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $_GET['BUYproducts_id'])); } else { $_SESSION['cart']->add_cart($_GET['BUYproducts_id'], $_SESSION['cart']->get_quantity($_GET['BUYproducts_id'])+1); } } xtc_redirect(xtc_href_link($goto, xtc_get_all_get_params(array('action')))); break; case 'notify': if (isset($_SESSION['customer_id'])) { if (isset($_GET['products_id'])) { $notify = $_GET['products_id']; } elseif (isset($_GET['notify'])) { $notify = $_GET['notify']; } elseif (isset($_POST['notify'])) { $notify = $_POST['notify']; } else { xtc_redirect(xtc_href_link(basename($PHP_SELF), xtc_get_all_get_params(array('action', 'notify')))); } if (!is_array($notify)) $notify = array($notify); for ($i = 0, $n = sizeof($notify); $i < $n; $i++) { $check_query = xtc_db_query("select count(*) as count from " . TABLE_PRODUCTS_NOTIFICATIONS . " where products_id = '" . $notify[$i] . "' and customers_id = '" . $_SESSION['customer_id'] . "'"); $check = xtc_db_fetch_array($check_query); if ($check['count'] < 1) { xtc_db_query("insert into " . TABLE_PRODUCTS_NOTIFICATIONS . " (products_id, customers_id, date_added) values ('" . $notify[$i] . "', '" . $_SESSION['customer_id'] . "', now())"); } } xtc_redirect(xtc_href_link(basename($PHP_SELF), xtc_get_all_get_params(array('action', 'notify')))); } else { // xtc_redirect(xtc_href_link(FILENAME_LOGIN, '', 'SSL')); } break; case 'notify_remove': if (isset($_SESSION['customer_id']) && isset($_GET['products_id'])) { $check_query = xtc_db_query("select count(*) as count from " . TABLE_PRODUCTS_NOTIFICATIONS . " where products_id = '" . $_GET['products_id'] . "' and customers_id = '" . $_SESSION['customer_id'] . "'"); $check = xtc_db_fetch_array($check_query); if ($check['count'] > 0) { xtc_db_query("delete from " . TABLE_PRODUCTS_NOTIFICATIONS . " where products_id = '" . $_GET['products_id'] . "' and customers_id = '" . $_SESSION['customer_id'] . "'"); } xtc_redirect(xtc_href_link(basename($PHP_SELF), xtc_get_all_get_params(array('action')))); } else { xtc_redirect(xtc_href_link(FILENAME_LOGIN, '', 'SSL')); } break; case 'cust_order': if (isset($_SESSION['customer_id']) && isset($_GET['pid'])) { if (xtc_has_product_attributes($_GET['pid'])) { xtc_redirect(xtc_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $_GET['pid'])); } else { $_SESSION['cart']->add_cart($_GET['pid'], $_SESSION['cart']->get_quantity($_GET['pid'])+1); } } xtc_redirect(xtc_href_link($goto, xtc_get_all_get_params($parameters))); break; } } kannst mir noch sagen, wie ich das genau ?ndere? :-) Danke! Link to comment Share on other sites More sharing options...
mzanier Posted March 31, 2004 Report Share Posted March 31, 2004 $_SESSION['cart']->add_cart($_GET['BUYproducts_id'], $_SESSION['cart']->get_quantity($_GET['BUYproducts_id'])+1); musst du mit deinem formfeld f?e die quantiy erweitern. get_quantity($_GET['BUYproducts_id'])+$_GET['dein_feld']); Link to comment Share on other sites More sharing options...
fauer Posted March 31, 2004 Author Report Share Posted March 31, 2004 leider wird das produkt nicht in den warenkorb ?bernommen nicht eines, auch nicht die menge die ich eingebe. folgende ?nderungen habe ich gemacht: application_top $_SESSION['cart']->add_cart($_GET['BUYproducts_id'], $_SESSION['cart']->get_quantity($_GET['BUYproducts_id'])+$_GET['products_mge']); product_listing if ($_SESSION['customers_status']['customers_status_show_price'] != '0') { $price=xtc_get_products_price($listing['products_id'], $price_special=1, $quantity=1); $buy_now='<a href="' . xtc_href_link(basename($PHP_SELF), xtc_get_all_get_params(array('action')) . 'action=buy_now&BUYproducts_id=' . $listing['products_id'], 'NONSSL') . '">' . xtc_draw_input_field('products_mge', '1','size="3"') . xtc_image_button('button_buy_now.gif', TEXT_BUY . $listing['products_name'] . TEXT_NOW); } Link to comment Share on other sites More sharing options...
mzanier Posted March 31, 2004 Report Share Posted March 31, 2004 jou, du hast ja auch noch keine form eingebaut, die das feld ?bergibt. Link to comment Share on other sites More sharing options...
peeeters Posted March 31, 2004 Report Share Posted March 31, 2004 kleiner tipp: benutz mal die suche! dazu habe ich vor einiger zeit eine l?sung geposted. Link to comment Share on other sites More sharing options...
fauer Posted April 1, 2004 Author Report Share Posted April 1, 2004 :-)) danke f?r die hilfe! @peters: war echt supi beschrieben lg, frankie Link to comment Share on other sites More sharing options...
Creativ Posted April 1, 2004 Report Share Posted April 1, 2004 Hallo fauer, kannst Du mir mal sagen wo du mit suchen was gefunden hast??? Mich w?rde das auch interessieren aber ich finde hier nichts! Link to comment Share on other sites More sharing options...
fauer Posted April 4, 2004 Author Report Share Posted April 4, 2004 such nach bestellmengenfeld lg, frankie Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.