Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Skip Preview on Product Insert or Update


Guest

Recommended Posts

I would need to see the rest ot TiMs mod to say.

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

  • 1 month later...

Contribution Uploaded....

Same thing, if you select a new picture, with the skip preview it doesnt get updated.

 

The rest works fine...

 

I don't know where you may have gone wrong, if it helps I have now uploaded a contrib with this plus the addition of a drop down to select the folder to store new product images.

 

http://addons.oscommerce.com/info/7088

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

  • 2 months later...

Hello all,

 

I have installed

 

-. Multi Images with Fancy Popup

-. oscThumb

-. skip preview

 

therefore I'm not sure where I have to post my problem.

 

All works fine only when I click onto the back button on the preview page I get this Error message:

 

Warning: trim() expects parameter 1 to be string, array given in D:\xampp\+++\catalog\admin\includes\functions\general.php on line 35

Anybody have the same problem?

 

Need help please.

Link to comment
Share on other sites

 

 

I would suspect the issue is unrelated, but with no details of the code in your file at that point its hard to tell anything. wink.gif

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

Most affected file is admin/categories.php

But when I post this content, it will be a lot of code :-(

Can I send you the file via PM?

 

 

Try doing a file compare with the files in Multi Images with Fancy Popup, that already has the skip preview anyway.

 

 

These add-ons are designed to work together, your issue is due to some error u have created.

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

  • 1 month later...

In admin/categories.php find 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>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF" onload="SetFocus();">

...and change it to this:

<!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

 

My code is slightly different to that because of Tiny MCE. Can you advise what to change with this please:

 

?>
<!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>
<!-- TinyMCE -->
<script type="text/javascript" src="tiny_mce/tiny_mce.js"></script>
<script type="text/javascript">
tinyMCE.init({
	// General options
	mode : "textareas",
	theme : "advanced",
	plugins : "safari,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,inlinepopups",

	// Theme options
	theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect,fontselect,fontsizeselect",
	theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
	theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
	theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak",
	theme_advanced_toolbar_location : "top",
	theme_advanced_toolbar_align : "left",
	theme_advanced_statusbar_location : "bottom",
	theme_advanced_resizing : true,

	// Example word content CSS (should be your site CSS) this one removes paragraph margins
	content_css : "css/lightbox.css",

	// Drop lists for link/image/media/template dialogs
	template_external_list_url : "lists/template_list.js",
	external_link_list_url : "lists/link_list.js",
	external_image_list_url : "lists/image_list.js",
	media_external_list_url : "lists/media_list.js",

	// Replace values for the template plugin
	template_replace_values : {
		username : "Some User",
		staffid : "991234"
	}
});
</script>
<!-- /TinyMCE -->
<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();">
<div id="spiffycalendar" class="text"></div>
<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //-->

Link to comment
Share on other sites

I have installed the contribution... But now I cannot upload images...

If I check the box for auto update system will not upload image... If I preview it works fine...

 

The install was straight forward.. Quick and easy.. Don't see anywhere I could have gone wrong...

What can I do to fix this..

 

Thanks

Jay

Link to comment
Share on other sites

The install was straight forward.. Quick and easy.. Don't see anywhere I could have gone wrong...

 

 

 

Check you edits again very carefully, you have made errors in the install, try using a file compare tool with the file in http://addons.oscommerce.com/info/7008 if you have trouble with the manual method, as much of that is the same.

 

 

Try using the supplied files in place of yours, you don't have to keep it that way, but it will show you that it works. smile.gif

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

Check you edits again very carefully, you have made errors in the install, try using a file compare tool with the file in http://addons.oscommerce.com/info/7008 if you have trouble with the manual method, as much of that is the same.

 

 

Try using the supplied files in place of yours, you don't have to keep it that way, but it will show you that it works. smile.gif

 

 

I have went thru everything... I have ajax attributes manager installed. Maybe issue...

 

Here is my code Click Here

Can you please take a look..

Link to comment
Share on other sites

I have went thru everything... I have ajax attributes manager installed. Maybe issue...

 

Here is my code Click Here

Can you please take a look..

 

 

bad link,

 

but perhaps u forgot to remove smthg!!

 

often plple manage to miss the same thing every time triple check again

 

try the file I sugested.

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

bad link,

 

 

 

 

Edit I`ve managed to look at your file, looks like an old version of osC!!

 

Do you have compatibilty.php??

 

You are mixing $HTTP_GET_VARS & $_GET on the page, a bad idea as some servers treat each as different + $HTTP_GET_VARS is depreciated, replace all $HTTP_GET_VARS with $_GET, do same for post vars

 

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

Edit I`ve managed to look at your file, looks like an old version of osC!!

 

Do you have compatibilty.php??

 

You are mixing $HTTP_GET_VARS & $_GET on the page, a bad idea as some servers treat each as different + $HTTP_GET_VARS is depreciated, replace all $HTTP_GET_VARS with $_GET, do same for post vars

 

 

Yes I know old version.. Been waiting for new osC to do complete rebuild..

 

I do have compatibilty.php in both includes/functions/

 

I replaced all $HTTP_GET_VARS with $_GET in the categories.php file... and $HTTP_POST_VARS with $_POST Problem Fixed.... Yeah.....

 

Should I do this replace in all files site wide.. ???? And will it create any issues.???

 

Thanks for your help....

Link to comment
Share on other sites

 

Should I do this replace in all files site wide.. ???? And will it create any issues.???

 

 

 

I would advise doing it whenever you come to edit a file, as long as u have only one type a a page it wont be an issue till the next php upgrade when $HTTP_GET_VARS are removed.

 

it wont create any issues unless your host were to downgrade to an old php version!!

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

My code is slightly different to that because of Tiny MCE. Can you advise what to change with this please:

 

?>
<!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>
<!-- TinyMCE -->
<script type="text/javascript" src="tiny_mce/tiny_mce.js"></script>
<script type="text/javascript">
tinyMCE.init({
	// General options
	mode : "textareas",
	theme : "advanced",
	plugins : "safari,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,inlinepopups",

	// Theme options
	theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect,fontselect,fontsizeselect",
	theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
	theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
	theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak",
	theme_advanced_toolbar_location : "top",
	theme_advanced_toolbar_align : "left",
	theme_advanced_statusbar_location : "bottom",
	theme_advanced_resizing : true,

	// Example word content CSS (should be your site CSS) this one removes paragraph margins
	content_css : "css/lightbox.css",

	// Drop lists for link/image/media/template dialogs
	template_external_list_url : "lists/template_list.js",
	external_link_list_url : "lists/link_list.js",
	external_image_list_url : "lists/image_list.js",
	media_external_list_url : "lists/media_list.js",

	// Replace values for the template plugin
	template_replace_values : {
		username : "Some User",
		staffid : "991234"
	}
});
</script>
<!-- /TinyMCE -->
<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();">
<div id="spiffycalendar" class="text"></div>
<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //-->

 

Spooks, can you help with this? Or was the code you had posted up an alternative?

Link to comment
Share on other sites

Spooks, can you help with this? Or was the code you had posted up an alternative?

 

 

If u really have no clue, edit a default categories file as per install, then use a file compare tool with your current.

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

If u really have no clue, edit a default categories file as per install, then use a file compare tool with your current.

 

Eventually I got there. Thanks again Spooks!

Link to comment
Share on other sites

  • 6 months later...

Hello Sam,

 

Now I have used a fresh osc 22rc2a to find out if the error message I had at my previous installation appear again because you told me

 

"I would suspect the issue is unrelated".

 

When I click at the preview page onto the back button I still get this error.

 

Warning: trim() expects parameter 1 to be string, array given in ..\catalog\admin\includes\functions\general.php on line 35

 

 

I have added into this fresh osc only oscThumb and your Simple Multiple Images (Unlimited) with Fancy Popups V1.3.5.

Principally no changes were made in the categories files.

 

Only this:

deprecated !!! (ereg_replace)

<td class="main"><?php echo tep_draw_textarea_field('products_description[' . $languages[$i]['id'] . ']', 'soft', '70', '15', (isset($products_description[$languages[$i]['id']]) ? ereg_replace('& ', '& ', trim(stripslashes($products_description[$languages[$i]['id']]))) : tep_get_products_description($pInfo->products_id, $languages[$i]['id']))); ?></td>

must be:
<td class="main"><?php echo tep_draw_textarea_field('products_description[' . $languages[$i]['id'] . ']', 'soft', '70', '15', (isset($products_description[$languages[$i]['id']]) ? stripslashes($products_description[$languages[$i]['id']]) : tep_get_products_description($pInfo->products_id, $languages[$i]['id']))); ?></td>

 

I have copied only. The error message is still the same.

 

Please can you check the original code of your contribution? I realy need this addon but I can not use it with an error.

 

My system is xampp 1.73 with php 5.31

 

Thank you

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...