|
|||
|
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); } |
|
||||
|
buy_now function in der application_top f?r das mengenfeld erweitern.
__________________
xt:Commerce Helpdesk xt:Commerce Blog xt:Commerce Warenwirtschaft ### ![]() Offene Stellen bei xt:Commerce! xt:Commerce stellt ein ### |
|
|||
|
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! |
|
||||
|
$_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']);
__________________
xt:Commerce Helpdesk xt:Commerce Blog xt:Commerce Warenwirtschaft ### ![]() Offene Stellen bei xt:Commerce! xt:Commerce stellt ein ### |
|
|||
|
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); } |
|
||||
|
jou, du hast ja auch noch keine form eingebaut, die das feld ?bergibt.
__________________
xt:Commerce Helpdesk xt:Commerce Blog xt:Commerce Warenwirtschaft ### ![]() Offene Stellen bei xt:Commerce! xt:Commerce stellt ein ### |
![]() |
| Lesezeichen |
| Stichworte |
| kaufen, mengenangabe |
| Themen-Optionen | |
| Ansicht | |
|
|