Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Removing Preview Product in Osc Admin


abubobbob

Recommended Posts

Hi ive got a bunch of products to add and the extra click of going through preview product although short is just annoying. I found this code in another thread:

 

      case 'new_product_preview':
// copy image only if modified
       $products_image = new upload('products_image');
       $products_image->set_destination(DIR_FS_CATALOG_IMAGES);
       if ($products_image->parse() && $products_image->save()) {
         $products_image_name = $products_image->filename;
       } else {
         $products_image_name = (isset($HTTP_POST_VARS['products_previous_image']) ? $HTTP_POST_VARS['products_previous_image'] : '');
       }
     reset($HTTP_POST_VARS);
     while (list($key, $value) = each($HTTP_POST_VARS)) {
       if (!is_array($HTTP_POST_VARS[$key])) {
         echo tep_draw_hidden_field($key, htmlspecialchars(stripslashes($value)));
       }
     }
       tep_redirect(tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $categories_id));
 break;

 

But it gives me the following error message:

 

Warning: Cannot modify header information - headers already sent by (output started at /Store/admin/categories.php:342) in admin/includes/functions/general.php on line 22

 

Line 22 reads as follows:

 

    header('Location: ' . $url);

 

Is there a more simple way of just adding in a update button into the screen first new product screen??? Where would i find the code for that update button :).

 

Thanks for any help

Link to comment
Share on other sites

no comment on the module, but the error message is most probably from extra blank lines in your categories.php (I guess at bottom)

:-)

Monika

 

addicted to writing code ... can't get enough of databases either, LOL!

 

my toolbox: Textpad - Compare and Merge - phpMyAdmin - WS_FTP - Photoshop - How to search the forum

 

Interactive Media Award July 2007 ~ category E-Commerce

my advice on the forum is for free, PMs where you send me work are considered consultation which I charge for ...

Link to comment
Share on other sites

no comment on the module, but the error message is most probably from extra blank lines in your categories.php (I guess at bottom)

 

Was one of the first things i checked, from reading this fourm alot ive noticed evil blank spaces cause alot of problems. :).

 

All the update button and insert button text is in the same catagory.php file, but i cant see where to move the insert button from the preview page to the main bit.

Link to comment
Share on other sites

Was one of the first things i checked, from reading this fourm alot ive noticed evil blank spaces cause alot of problems. :).

 

All the update button and insert button text is in the same catagory.php file, but i cant see where to move the insert button from the preview page to the main bit.

 

 

Not update button i mean the preview button.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...