Chemo
May 31 2005, 12:56 PM
In admin/categories.php find this code:
CODE
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
<title><?php echo TITLE; ?></title>
<link rel="stylesheet" type="text/css" href="includes/stylesheet.css">
<script language="javascript" src="includes/general.js"></script>
</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF" onload="SetFocus();">
...and change it to this:
CODE
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
<title><?php echo TITLE; ?></title>
<link rel="stylesheet" type="text/css" href="includes/stylesheet.css">
<script language="javascript" src="includes/general.js"></script>
</head>
<?
switch($_GET['action']){
case 'new_product_preview':
$onload = isset($_GET['pID']) ? 'document.update_product.submit();' : 'document.insert_product.submit();';
break;
default:
$onload = 'SetFocus();';
break;
}
?>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF" onload="<? echo $onload; ?>">
...all done.
Now on new product insert or existing product update it will skip the preview page completely (actually, auto submit instantly on page load).
Enjoy!
Bobby
spr1nt
Jun 4 2005, 08:53 AM
chemo....thaaaaaank you. ive been trying to do this but with my limited php knowledge the only results ive been getting are error messages. im sure this will help many others !
kitchenniche
Jun 9 2005, 10:03 PM
Great! this saves a lot of time!
BTBJ
Jun 10 2005, 05:02 PM
Fabulous ... thanks a lot, love this
bibleman
Jul 23 2005, 10:22 PM
QUOTE (Chemo @ May 31 2005, 07:56 AM)
In admin/categories.php find this code:
CODE
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
<title><?php echo TITLE; ?></title>
<link rel="stylesheet" type="text/css" href="includes/stylesheet.css">
<script language="javascript" src="includes/general.js"></script>
</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF" onload="SetFocus();">
...and change it to this:
CODE
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
<title><?php echo TITLE; ?></title>
<link rel="stylesheet" type="text/css" href="includes/stylesheet.css">
<script language="javascript" src="includes/general.js"></script>
</head>
<?
switch($_GET['action']){
case 'new_product_preview':
$onload = isset($_GET['pID']) ? 'document.update_product.submit();' : 'document.insert_product.submit();';
break;
default:
$onload = 'SetFocus();';
break;
}
?>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF" onload="<? echo $onload; ?>">
...all done.
Now on new product insert or existing product update it will skip the preview page completely (actually, auto submit instantly on page load).
Enjoy!
Bobby
Hi Bobby,
GREAT hack BUT.....
It all worked great but when you double click on a product in the products list under it's catagory then the product gets deleted!
Did anyone else experience this?
yello
Jul 24 2005, 03:36 AM
QUOTE (bibleman @ Jul 23 2005, 10:22 PM)
Hi Bobby,
GREAT hack BUT.....
It all worked great but when you double click on a product in the products list under it's catagory then the product gets deleted!
Did anyone else experience this?
Yep. I have the same problem
PVK
Jul 24 2005, 06:50 PM
Hmmm this was exactly what i was searching for, but the last 2 posts are a bit worrysome, which make me a bit unsure if it is wise to implement this great modification since it is a bit scary that you can actually delete products so easy (which sooner or later is bound to happen!)
Anybody figured it out yet?
Rochdalemark
Jul 27 2005, 08:17 AM
QUOTE (PVK @ Jul 24 2005, 06:50 PM)
Hmmm this was exactly what i was searching for, but the last 2 posts are a bit worrysome, which make me a bit unsure if it is wise to implement this great modification since it is a bit scary that you can actually delete products so easy (which sooner or later is bound to happen!)
Anybody figured it out yet?
Anyone Fixed this yet???
J0hnnyBr4v0
Jul 31 2005, 09:24 PM
QUOTE (Rochdalemark @ Jul 27 2005, 09:17 AM)
Yup I also have the same problem.
Mod uninstalled.
pulsecheck
Aug 1 2005, 03:40 AM
I had to uninstall the mode cause I experienced the same problem
rbartz
Aug 24 2005, 09:15 AM
Here is the fix for the problem where the product is "deleted" (actually emptied of data...) when you click the product line to preview it:
Between the </head> and <body....... lines make it like this:
</head>
<?
if ($_GET['read'] != "only") {
switch($_GET['action']){
case 'new_product_preview':
$onload = isset($_GET['pID']) ? 'document.update_product.submit();' : 'document.insert_product.submit();';
break;
case 'new_master_preview':
$onload = isset($_GET['pID']) ? 'document.update_master.submit();' : 'document.insert_master.submit();';
break;
default:
$onload = 'SetFocus();';
break;
}
} else {
$onload = 'SetFocus();';
}
?>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF" onload="<? echo $onload; ?>">
There! You might want to change the Preview Button to Save....
SORRY about the tabbing and spacing, for some reason I cannot get the input to do it.... I edited it three times trying, I am done. duhhhhh
akvario
Nov 25 2007, 06:22 PM
Thanks, just what i was looking for, confirmed working.
qiang
Mar 15 2008, 05:02 PM
Thank you so much, it works!!!
melhaa
Mar 23 2008, 12:16 PM
Hi
I really want this, but I already have an onload in my body from ajax attribute manager.
Any idea how to get this anyway?
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.