Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

abrown1982

Archived
  • Posts

    2
  • Joined

  • Last visited

Profile Information

  • Real Name
    Allan

abrown1982's Achievements

  1. Just a quick comment to hopefully help someone. The contribution is great, but theres a bug if you try to upload images with a space in them. You get an invalid hash error. To fix this simply strip out the spaces from the filenames. This can be done in the code. in file: admin/includes/classes/upload.php about line 41 change if (isset($_FILES[$this->file])) { $file = array('name' => $_FILES[$this->file]['name'], 'type' => $_FILES[$this->file]['type'], 'size' => $_FILES[$this->file]['size'], 'tmp_name' => $_FILES[$this->file]['tmp_name']); } elseif (isset($HTTP_POST_FILES[$this->file])) { $file = array('name' => $HTTP_POST_FILES[$this->file]['name'], 'type' => $HTTP_POST_FILES[$this->file]['type'], 'size' => $HTTP_POST_FILES[$this->file]['size'], 'tmp_name' => $HTTP_POST_FILES[$this->file]['tmp_name']); } to if (isset($_FILES[$this->file])) { $newFilename = str_replace(" ", "-", $HTTP_POST_FILES[$this->file]['name']); $file = array('name' => $newFilename, 'type' => $_FILES[$this->file]['type'], 'size' => $_FILES[$this->file]['size'], 'tmp_name' => $_FILES[$this->file]['tmp_name']); } elseif (isset($HTTP_POST_FILES[$this->file])) { $file = array('name' => $newFilename, 'type' => $HTTP_POST_FILES[$this->file]['type'], 'size' => $HTTP_POST_FILES[$this->file]['size'], 'tmp_name' => $HTTP_POST_FILES[$this->file]['tmp_name']); } And any spaces in the filename will be changed to a dash which fixes the bug.
  2. Hi All, Im having an issue where the "products_code" isint being inserted into the database. From looking at the code I think this should be done in checkout_process.php around line 160 right? When is checkout_process.php called, and is it possible that if im using a different payment method that this isint the file which is doing the inserting? Thanks, Allan
×
×
  • Create New...