Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Ibissen

Pioneers
  • Posts

    3
  • Joined

  • Last visited

Profile Information

  • Real Name
    Realname

Ibissen's Achievements

  1. Hi Zappo, thanks a lot for your help. Finally I found the mistake (which has nothing to do with the application_top.php): It is a conflict between STS and Open Type in include/function/html_output.php ca. line 78 // START STS v4.4: global $sts; $sts->image($src); // Take image from template folder if exists. // END STS v4.4 I comment this out, because I don't need images in the template folder. Maybe this is helpful for somebody else ... Tahnks, Isbissen
  2. Dear Zappo, thank you for your reply. But it is exactly the other way around: If I use the original code of "option type", the file IS uploaded and the product IS not added to the basket, AND I get the 500 error by the application_top - add product - function. In the meanwhile I de-installed the contributions STS and PWA, which couldn't be the reason. Additionally I work with QPBPP (latest version), which requires a modification of the add_card function in application_top.php: OPTION TYPE: $cart->add_cart($HTTP_POST_VARS['products_id'], $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'], $real_ids))+1, $real_ids); QPBPP: $cart->add_cart($HTTP_POST_VARS['products_id'], $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'], $real_ids)) + $HTTP_POST_VARS['cart_quantity'], $real_ids); But in my option this can't be responible for that error too ... If comment out the following section (trail and error solution), I don't get an 500-error, the product (with attribut) is transfered to the basket, BUT the file wasn't uploaded: //if (!($products_options_file->save())) { //break 2; //} } //else { //break 2; //} If you or anyone else can help me with that problem - that would be great. (I hope, it is not a stupid bracket thing ... I checked it at least twenty times) Ibissen
  3. Hello and thanks for that contribution. it works fine, but I have a strange problem with application_top.php - add_product: I get a 500 error with this part of code (but the upload works) or - if I comment this out - the script works, but no uploads. //if (!($products_options_file->save())) { //break 2; //} } //else { //break 2; //} Here is the whole add_prduct code: case 'add_product' : if (isset($HTTP_POST_VARS['products_id']) && is_numeric($HTTP_POST_VARS['products_id'])) { $real_ids = $HTTP_POST_VARS['id']; if ($HTTP_POST_VARS['number_of_uploads'] > 0) { require(DIR_WS_CLASSES . 'upload.php'); for ($i = 1; $i <= $HTTP_POST_VARS['number_of_uploads']; $i++) { $TEMP_FILE = $_FILES['id']['tmp_name'][TEXT_PREFIX . $HTTP_POST_VARS[uPLOAD_PREFIX . $i]]; if (tep_not_null($TEMP_FILE) && $TEMP_FILE != 'none') { $products_options_file = new upload('id'); if (tep_session_is_registered('customer_id')) { $products_options_file->set_destination(UPL_DIR); } else { $products_options_file->set_destination(TMP_DIR); } if ($products_options_file->parse(TEXT_PREFIX . $HTTP_POST_VARS[uPLOAD_PREFIX . $i])) { if (tep_session_is_registered('customer_id')) { tep_db_query("insert into " . TABLE_FILES_UPLOADED . " (sesskey, customers_id, files_uploaded_name, date) values('" . tep_session_id() . "', '" . $customer_id . "', '" . tep_db_input($products_options_file->filename) . "', '" . date("d-m-y") . "')"); } else { tep_db_query("insert into " . TABLE_FILES_UPLOADED . " (sesskey, files_uploaded_name, date) values('" . tep_session_id() . "', '" . tep_db_input($products_options_file->filename) . "', '" . date("d-m-y") . "')"); } //BOF - Zappo - Option Types v2 - Set File Prefix if (OPTIONS_TYPE_FILEPREFIX == 'Database') { // Database ID as File prefix $insert_id = tep_db_insert_id() . '_'; } else { // Date, time or both as File prefix (Change date formatting here) if (OPTIONS_TYPE_FILEPREFIX == 'Date' || OPTIONS_TYPE_FILEPREFIX == 'DateTime') { $insert_id = 'D'.date("d-m-y_"); } $insert_id .= (OPTIONS_TYPE_FILEPREFIX == 'DateTime' || OPTIONS_TYPE_FILEPREFIX == 'Time') ? 'T'.date("H-i_") : ''; } //EOF - Zappo - Option Types v2 - Set File Prefix //Update filename in Database with correct prefix (For comparing database names with real files) tep_db_query("update " . TABLE_FILES_UPLOADED . " set files_uploaded_name = '" . tep_db_input($insert_id . $products_options_file->filename) . "' where sesskey = '" . tep_session_id() . "' and files_uploaded_name = '" . tep_db_input($products_options_file->filename) . "' and date = '" . date("d-m-y") . "'"); $real_ids[TEXT_PREFIX . $HTTP_POST_VARS[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())) { //break 2; //} } //else { //break 2; //} } else { // No file uploaded -- use previously uploaded file (From Dropdown) $real_ids[TEXT_PREFIX . $HTTP_POST_VARS[uPLOAD_PREFIX . $i]] = $HTTP_POST_VARS[TEXT_PREFIX . UPLOAD_PREFIX . $i]; } } } $cart->add_cart($HTTP_POST_VARS['products_id'], $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'], $real_ids)) + $HTTP_POST_VARS['cart_quantity'], $real_ids); } tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters))); break; I have no idea ... Maybe someone can help me? Ibissen, PS. Sorry for my English.
×
×
  • Create New...