|
|||
|
Hallo,
also ich habe ein problem mit einer installation von ein modul, ich habe schon viele andere module installiert, desshalb sieht diese datei nicht mehr so aus wie in der installationsanleitung beschrieben. ich scheitere einfach an dieser einen datei und probiere schon seit 2 tagen alles aus. Ich wäre sehr sehr dankbar für hilfe. ich würde auch geld dafür bezahlen wenn mir einer eine passende lösung dafür anbietet, bin voll am verzweifeln. wie kann ich diesen php code (includes/cart_actions.php): // new for upload // customer adds a product from the products page case 'add_product' : // echo 'Ausgabe aus cart_actions.php :' . '<br />'; 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); } $real_ids = $_POST['id']; if ($_SESSION['number_of_uploads'] > 0) { $number_of_uploads = $_SESSION['number_of_uploads']; require(DIR_WS_CLASSES . 'upload.php'); for ($i = 1; $i <= $number_of_uploads; $i++) { if (xtc_not_null($_FILES['id']['tmp_name'][TEXT_PREFIX . $_POST[UPLOAD_PREFIX . $i]]) && ($_FILES['id']['tmp_name'][TEXT_PREFIX . $_POST[UPLOAD_PREFIX . $i]] != 'none')) { $products_options_file = new upload('id'); $products_options_file->set_destination(DIR_FS_UPLOADS); if(substr(phpversion(),0,1) < 5){ $products_options_file->filename = str_replace(' ','_',$products_options_file->filename); }else{ $products_options_file->filename = str_ireplace(' ','_',$products_options_file->filename); } if ($products_options_file->parse(TEXT_PREFIX . $_POST[UPLOAD_PREFIX . $i])) { if (xtc_session_is_registered('customer_id')) { xtc_db_query("insert into " . TABLE_FILES_UPLOADED . " (sesskey, customers_id, files_uploaded_name) values('" . xtc_session_id() . "', '" . $customer_id . "', '" . xtc_db_input($products_options_file->filename) . "')"); } else { xtc_db_query("insert into " . TABLE_FILES_UPLOADED . " (sesskey, files_uploaded_name) values('" . xtc_session_id() . "', '" . xtc_db_input($products_options_file->filename) . "')"); } $insert_id = xtc_db_insert_id(); $real_ids[TEXT_PREFIX . $_POST[UPLOAD_PREFIX . $i]] = $insert_id . "_" . $products_options_file->filename; $products_options_file->set_filename("$insert_id" . "_" . $products_options_file->filename); if (!($products_options_file->save())) { $_SESSION['upload_status'] = $products_options_file->upload_status; break 2; } } else { $_SESSION['upload_status'] = $products_options_file->upload_status; break 2; } } else { // No file uploaded -- use previous value $_SESSION['upload_status'] = $products_options_file->upload_status; $real_ids[TEXT_PREFIX . $_POST[UPLOAD_PREFIX . $i]] = $_POST[TEXT_PREFIX . UPLOAD_PREFIX . $i]; } } // }else{ // echo '$real_ids : ' . implode(' - ', $real_ids) . '<br />'; // break; } $_SESSION['upload_status'] = $products_options_file->upload_status; if($_POST['submit_target'] == 'wishlist') { $_SESSION['wishList']->add_cart((int)$_POST['products_id'], $_SESSION['wishList']->get_quantity(xtc_get_uprid($_POST['products_id'], $_POST['id']))+$_POST['products_qty'], $_POST['id']); $goto = 'wish_list.php'; } else { $_SESSION['cart']->add_cart((int)$_POST['products_id'], $_SESSION['cart']->get_quantity(xtc_get_uprid($_POST['products_id'], $_POST['id']))+$_POST['products_qty'], $_POST['id']); } $_SESSION['cart']->add_cart((int) $_POST['products_id'], $_SESSION['cart']->get_quantity(xtc_get_uprid($_POST['products_id'], $real_ids)) + xtc_remove_non_numeric($_POST['products_qty']), $real_ids); } xtc_redirect(xtc_href_link($goto, xtc_get_all_get_params($parameters))); break; // Eof new for Upload in deisen Code mit einfügen (in der beschreibung steht ersetzen, aber das war die original datei von xtc, dann würden ja meine anderen module nicht mehr funktionieren): case 'add_product' : if (isset($_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); } $pids = count($_POST['products_id']); for($i=0; $i<$pids; $i++){ $_SESSION['cart']->add_cart((int)$_POST['products_id'][$i], $_SESSION['cart']->get_quantity(xtc_get_uprid($_POST['products_id'][$i], $_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; BITTE UM HILFE |
![]() |
| Lesezeichen |
| Stichworte |
| brauche, dringend, hilfe |
| Themen-Optionen | |
| Ansicht | |
|
|
Ähnliche Themen
|
||||
| Thema | Autor | Forum | Antworten | Letzter Beitrag |
| Brauche dringend Hilfe habe fehlermelung | Flora | Installation und Konfiguration | 7 | 10.04.2007 21:46 |