Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How to Disable Preview In Admin of Oscommerce


groupv

Recommended Posts

Hello all,

 

Does anyone know how to disable the preview, when editing a product? I basically want to speed up the process, as a preview isn't necessary. I saw a post on another website that descriped it as "bypassing the preview screen", which I have quoted below:

 

"

Does anyone know how to copy the update from the 2nd product update screen (when updating product description after pressing preview button) to the first product update screen (screen with preview button).When there's only a minor change in the product description, it's annoying to have to go through the preview stage... which I'd just love to bypass sometimes.

 

"

 

Thank you in advance for any help!

 

 

Ryan

groupvertical.com

Link to comment
Share on other sites

this is the code I use, it may not work for you:

 

in categories.php

 

find:

 

  $action = (isset($HTTP_GET_VARS['action']) ? $HTTP_GET_VARS['action'] : '');

 

add after:

 

 

if ($action == 'new_product_preview') { 
  $products_image = new upload('products_image');
 $products_image->set_destination(DIR_FS_CATALOG_IMAGES);
	if ($products_image->parse() && $products_image->save()) {
	  $_POST['products_image'] = $products_image->filename;

	} else {
	  $_POST['products_image'] = (isset($_POST['products_previous_image']) ? $_POST['products_previous_image'] : '');
	}

 $action =  (isset($_GET['pID'])) ? 'update_product' : 'insert_product';
}

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...