Jump to content

JS_Supplies

Members
  • Content count

    43
  • Joined

  • Last visited

About JS_Supplies

  • Birthday 01/21/1990

Profile Information

  1. JS_Supplies

    [Contribution] STS v4

    How do Edit and add a pop-up image template?
  2. define('DIR_FS_DOCUMENT_ROOT', $DOCUMENT_ROOT . '...'); define('DIR_FS_DOCUMENT_ROOT', $_SERVER['DOCUMENT_ROOT']);
  3. hey I fix the double // it was here: admin/includes/local/configure.php (line 4) define('DIR_FS_DOCUMENT_ROOT', $DOCUMENT_ROOT . '../'); take out the "/" and the error reads:
  4. if you wouldn't mind, thank you for trying
  5. define('DIR_FS_CATALOG_IMAGES', DIR_FS_CATALOG . 'images/');
  6. admin/includes/configure.php ( line 37) //sets default image directories define('DIR_FS_MANUFACTURERS_IMAGES', 'manufacturers/'); define('DIR_FS_CATEGORIES_IMAGES', 'categories/'); define('DIR_FS_PRODUCTS_IMAGES', 'products/'); // admin/includes/languages/english/categories.php (line 96) define('ERROR_CATALOG_PRODUCT_IMAGE_DIRECTORY_DOES_NOT_EXIST', 'Error: Catalog products images directory does not exist: ' . DIR_FS_CATALOG_IMAGES . DIR_FS_PRODUCTS_IMAGES . $_SESSION['categoryfile']); admin/categories.php (line 80) $categories_image = new upload('categories_image'); $categories_image->set_destination(DIR_FS_CATALOG_IMAGES . DIR_FS_CATEGORIES_IMAGES); if ($categories_image->parse() && $categories_image->save()) { tep_db_query("update " . TABLE_CATEGORIES . " set categories_image = '" . DIR_FS_CATEGORIES_IMAGES . tep_db_input($categories_image->filename) . "' where categories_id = '" . (int)$categories_id . "'"); } Line 315 // copy image only if modified unset($_SESSION['categoryfile']); $cid = explode('_', $cPath); $categoryfile = ''; foreach($cid as $key => $value){ if($value != '0'){ $cdat = tep_db_query("SELECT `categories_name` FROM `categories_description` WHERE `categories_id` = '" . $value . "' && `language_id` = '1'"); $cat = tep_db_fetch_array($cdat); $categoryfile .= $cat['categories_name'] . "/"; } } $_SESSION['categoryfile'] = $categoryfile; $products_image = new upload('products_image'); $products_image->set_destination(DIR_FS_CATALOG_IMAGES . DIR_FS_PRODUCTS_IMAGES . $categoryfile); if ($products_image->parse() && $products_image->save()) { $products_image_name = DIR_FS_PRODUCTS_IMAGES . $categoryfile . $products_image->filename; } else { $products_image_name = (isset($HTTP_POST_VARS['products_previous_image']) ? $HTTP_POST_VARS['products_previous_image'] : ''); } break; } } // check if the catalog image directory exists if (is_dir(DIR_FS_CATALOG_IMAGES . DIR_FS_PRODUCTS_IMAGES . $categoryfile)) { if (!is_writeable(DIR_FS_CATALOG_IMAGES . DIR_FS_PRODUCTS_IMAGES . $categoryfile)) $messageStack->add(ERROR_CATALOG_PRODUCT_IMAGE_DIRECTORY_NOT_WRITEABLE, 'error'); } else { $messageStack->add(ERROR_CATALOG_PRODUCT_IMAGE_DIRECTORY_DOES_NOT_EXIST, 'error'); unset($_SESSION['categoryfile']); }
  7. Before inserting image: Before Refreshing: After Refreshing: After Inserting image:
  8. admin/categories.php (line 315) // copy image only if modified unset($_SESSION['categoryfile']); $cid = explode('_', $cPath); $categoryfile = ''; foreach($cid as $key => $value){ if($value != '0'){ $cdat = tep_db_query("SELECT `categories_name` FROM `categories_description` WHERE `categories_id` = '" . $value . "' && `language_id` = '1'"); $cat = tep_db_fetch_array($cdat); $categoryfile .= $cat['categories_name'] . "/"; } } $_SESSION['categoryfile'] = $categoryfile; $products_image = new upload('products_image'); $products_image->set_destination(DIR_FS_CATALOG_IMAGES . DIR_FS_PRODUCTS_IMAGES . $categoryfile); if ($products_image->parse() && $products_image->save()) { $products_image_name = DIR_FS_PRODUCTS_IMAGES . $categoryfile . $products_image->filename; } else { $products_image_name = (isset($HTTP_POST_VARS['products_previous_image']) ? $HTTP_POST_VARS['products_previous_image'] : ''); } break; } } // check if the catalog image directory exists if (is_dir(DIR_FS_CATALOG_IMAGES . DIR_FS_PRODUCTS_IMAGES . $categoryfile)) { if (!is_writeable(DIR_FS_CATALOG_IMAGES . DIR_FS_PRODUCTS_IMAGES . $categoryfile)) $messageStack->add(ERROR_CATALOG_PRODUCT_IMAGE_DIRECTORY_NOT_WRITEABLE, 'error'); } else { $messageStack->add(ERROR_CATALOG_PRODUCT_IMAGE_DIRECTORY_DOES_NOT_EXIST, 'error'); unset($_SESSION['categoryfile']); } admin/includes/languages/categories.php (line 96) define('ERROR_CATALOG_PRODUCT_IMAGE_DIRECTORY_DOES_NOT_EXIST', 'Error: Catalog products images directory does not exist: ' . DIR_FS_CATALOG_IMAGES . DIR_FS_PRODUCTS_IMAGES . $_SESSION['categoryfile']); Is this right?
  9. ok, is there a way to just make the manufacturers and categories just change directories and the products not since the products don't like to corporate, unless you want to still figure out how to make then work its up do you..
  10. when i replace the code the whole oscommerce goes blank.... man I feel bad I am making work so hard on this.... I wish I could understand this code then I could help
  11. ya, still don't work and I don't use the drop down menu, personal I think its a pain using it and never use it
  12. when i do that it makes the little English flag goes a way and it still don't work... same errors Error: Destination does not exist. Error Error: Catalog products images directory does not exist: ../images/products/
  13. define('DIR_FS_DOCUMENT_ROOT', $DOCUMENT_ROOT); // where your pages are located on the server. if $DOCUMENT_ROOT doesnt suit you, replace with your local path. (eg, /usr/local/apache/htdocs) define('DIR_WS_CATALOG', '/catalog/');
  14. still the same I dont know it this helps but this is how my oscommerce was installed:
×