Jump to content
jhilgeman

NEW! Complete Order Editing Tool!

Recommended Posts

I am setting up a new cart, currently on a localhost. I have installed the most current versions of Order Editor and Manual Order Maker. We will be taking orders over the phone. When creating a new order, order editor allows me to select credit card as payment method but does not allow entry of information. How do I add and store this information? Is there an add-on that will send a new order through for credit card processing?

Share this post


Link to post
Share on other sites
What browser are you using, and are you getting any JavaScript errors from it?

 

Hi DJ,

 

This happens with IE6 (Windows XP SP2) and with Firefox 2.0.0.6. No errors are apparent, Javascript or otherwise. I'll re-try the install again today and will let you know how I go. I'll also do an install on a clean copy of osC, just to make sure there's no other contributions messing with it.

 

Cheers,

Max

Share this post


Link to post
Share on other sites
I am setting up a new cart, currently on a localhost. I have installed the most current versions of Order Editor and Manual Order Maker. We will be taking orders over the phone. When creating a new order, order editor allows me to select credit card as payment method but does not allow entry of information. How do I add and store this information? Is there an add-on that will send a new order through for credit card processing?

 

Go to Admin->Configuration->Order Editor->"Select your credit card payment method"->select your credit card payment method->In Order Editor, when you select your credit card payment method, the fields for storing cc info appear. Order Editor is not a payment module, however. Actually processing the credit card payment is up to you.


Do, or do not. There is no try.

 

Order Editor 5.0.6 "Ultra Violet" is now available!

For support or to post comments, suggestions, etc, please visit the Order Editor support thread.

Share this post


Link to post
Share on other sites
Hi DJ,

 

This happens with IE6 (Windows XP SP2) and with Firefox 2.0.0.6. No errors are apparent, Javascript or otherwise. I'll re-try the install again today and will let you know how I go. I'll also do an install on a clean copy of osC, just to make sure there's no other contributions messing with it.

 

Cheers,

Max

 

That should not be necessary. Open an order using Order Editor in Firefox, then go to Tools->Error Console. Hit "Clear". Then try to edit an order by changing products prices, quantities, etc. Once the total components disappear check the error console window and see if any new errors have appeared.


Do, or do not. There is no try.

 

Order Editor 5.0.6 "Ultra Violet" is now available!

For support or to post comments, suggestions, etc, please visit the Order Editor support thread.

Share this post


Link to post
Share on other sites
Hi!

Firstly, thanks for this wonderful contribution.

I have just installed osCommerce and this is the very first contribution I have tried to install.

Since I didn't have any other editions, I basically uploaded the required folders/files into their respective and overwrite the existing.

When I test to edit the order, I receive the same error as jimmydagoogler.

Any guide or suggestion would be deeply appreciated~ :blush:

 

As it turns out, tep_hide_session_id() is used in admin/orders.php at lines 334 and 337 of the stock file (must be new for RC1 or I just missed it before).

 

If you just installed osC you must be using RC1; if you're not using RC1 you should upgrade before you make any other changes.

 

The function tep_hide_session_id() is defined on the admin side at admin/includes/functions/html_output.php at about line 294:

////
// Hide form elements
  function tep_hide_session_id() {
 $string = '';

 if (defined('SID') && tep_not_null(SID)) {
   $string = tep_draw_hidden_field(tep_session_name(), tep_session_id());
 }

 return $string;
  }

////

 

Based on what i've seen so far it appears the conflict you and jimmy have described occurs when dropping the files included with the contribution into a brand new osC install that is pre-RC1.


Do, or do not. There is no try.

 

Order Editor 5.0.6 "Ultra Violet" is now available!

For support or to post comments, suggestions, etc, please visit the Order Editor support thread.

Share this post


Link to post
Share on other sites
That should not be necessary. Open an order using Order Editor in Firefox, then go to Tools->Error Console. Hit "Clear". Then try to edit an order by changing products prices, quantities, etc. Once the total components disappear check the error console window and see if any new errors have appeared.

 

Hi DJ,

 

Here's what happened:

 

When I clicked the "edit" button to go to the edit_orders.php:

 

Warning: Error in parsing value for property 'cursor'. Declaration dropped.

Source File: http://mydomain.com/admin/includes/stylesheet.css

Line: 54

 

Warning: Error in parsing value for property 'margin-top'. Declaration dropped.

Source File: http://mydomain.com/admin/edit_orders.php?oID=50

Line: 111

 

When attempting to change the quantity of an item:

 

Warning: Error in parsing value for property 'width'. Declaration dropped.

Source File: http://mydomain.com/admin/edit_orders.php?oID=50

Line: 0

 

When attempting to delete an item:

 

Warning: Error in parsing value for property 'width'. Declaration dropped.

Source File: http://mydomain.com/admin/edit_orders.php?oID=50

Line: 0

 

The error relating to 'cursor' also appears in my default installation of osC.

 

I hope this is helpful - on the face of it, there seems to be some problem with CSS, but I don't know if it is related to this particular problem. Thanks for all your help :)

 

Max

Share this post


Link to post
Share on other sites
Hi DJ,

 

Here's what happened:

 

When I clicked the "edit" button to go to the edit_orders.php:

 

When attempting to change the quantity of an item:

 

When attempting to delete an item:

 

The error relating to 'cursor' also appears in my default installation of osC.

 

I hope this is helpful - on the face of it, there seems to be some problem with CSS, but I don't know if it is related to this particular problem. Thanks for all your help :)

 

Max

 

Those errors are normal. But, something is not happening. You're not getting a responseText, in fact nothing is happening on the server side.

 

What PHP version are you running?


Do, or do not. There is no try.

 

Order Editor 5.0.6 "Ultra Violet" is now available!

For support or to post comments, suggestions, etc, please visit the Order Editor support thread.

Share this post


Link to post
Share on other sites
Ajax Order Editor is excellent!

But i have one problem with charset (other than iso-8859-1, for example, problem with russian language charset windows-1251).

 

All content in ajax order editor in UTF-8.

For example, i change Shipping method and after reloading input filed with shipping method was filled with new shipping information BUT in UTF-8 encoding, not in windows-1251.

 

How to use CHARSET constant defined in osCommerce ?!

 

I change in /admin/edit_order_ajax.php

  // output a response header
  header('Content-type: text/html; charset=ISO-8859-1');

  require('includes/application_top.php');

to:

  require('includes/application_top.php');

  // output a response header
  header('Content-type: text/html; charset='.CHARSET.'');

 

And problem resolved, but not for all ajax order editor.

 

Comments still added in UTF-8 encoding and sending to customer in UTF-8.

I wan't to see all information in CHARSET constant (for russian - CHARSET constant = windows-1251)

 

P.S. Sorry for my english, i hope you understand me.

 

This is excellent information, thank you for pointing out these problems. Unfortunately, as you have experienced, XMLHttpRequest sends all data in UTF-8 format. That's not something we can change, it's just the way it works.

 

Here's what I'm wondering, however: what happens if you change your charset to UTF-8?


Do, or do not. There is no try.

 

Order Editor 5.0.6 "Ultra Violet" is now available!

For support or to post comments, suggestions, etc, please visit the Order Editor support thread.

Share this post


Link to post
Share on other sites
SUPER NOW is editing OK.

 

My last problem with code on pages.

 

Because I have page in another language (czech) have trouble with write to database. In other part of shop is editing OK. When I use code Windows-1250

 

i change in editorder.php this

 

*/

// charset for web pages and emails

define('CHARSET', 'windows-1250');

 

here is sample BEFORE EDIT: - here is OK

 

here is picture when EDITing : - here is OK

 

after send comments or select shipping : - here is bad code for my language.

 

I test today ORDER EDIT and other function is very good. I make only language modul for CZECH.

 

Thank you for pointing out these problems. As VaM has suggested, change in /admin/edit_order_ajax.php

  // output a response header
  header('Content-type: text/html; charset=ISO-8859-1');

  require('includes/application_top.php');

to:

  require('includes/application_top.php');

  // output a response header
  header('Content-type: text/html; charset='.CHARSET.'');

 

After that, I have the same question for you: what happens if you change your Charset to UTF-8?


Do, or do not. There is no try.

 

Order Editor 5.0.6 "Ultra Violet" is now available!

For support or to post comments, suggestions, etc, please visit the Order Editor support thread.

Share this post


Link to post
Share on other sites
Those errors are normal. But, something is not happening. You're not getting a responseText, in fact nothing is happening on the server side.

 

What PHP version are you running?

 

Hi DJ,

 

I'm running 4.4.4, on Apache 2.0.54 (Linux Fedora core).

 

Cheers,

Max

Share this post


Link to post
Share on other sites
Hi DJ,

 

I'm running 4.4.4, on Apache 2.0.54 (Linux Fedora core).

 

Cheers,

Max

 

What is your server setting for register_globals?


Do, or do not. There is no try.

 

Order Editor 5.0.6 "Ultra Violet" is now available!

For support or to post comments, suggestions, etc, please visit the Order Editor support thread.

Share this post


Link to post
Share on other sites
What is your server setting for register_globals?

 

Server settings for register_globals is off, however there is an entry in /.htaccess as follows:

 

#<IfModule mod_php4.c>
 php_value session.use_trans_sid 0
 php_value register_globals 1
#</IfModule>

 

osC works correctly without the use of the register_globals patch - my assumption is that this setting in .htaccess overrides the server setting. I just checked the .htaccess in the /admin folder and all of this had been commented out. So I replaced it with the text above, but still get no joy.

 

Cheers,

Max

Share this post


Link to post
Share on other sites
Server settings for register_globals is off, however there is an entry in /.htaccess as follows:

 

#<IfModule mod_php4.c>
  php_value session.use_trans_sid 0
  php_value register_globals 1
#</IfModule>

 

osC works correctly without the use of the register_globals patch - my assumption is that this setting in .htaccess overrides the server setting. I just checked the .htaccess in the /admin folder and all of this had been commented out. So I replaced it with the text above, but still get no joy.

 

Cheers,

Max

 

Go to Admin->Tools->Server info and find there what the Local Value of register_globals is.


Do, or do not. There is no try.

 

Order Editor 5.0.6 "Ultra Violet" is now available!

For support or to post comments, suggestions, etc, please visit the Order Editor support thread.

Share this post


Link to post
Share on other sites

An update. I switched AJAX off again, and now in Firefox I see the "Update" button. It is definitely not there in IE. Bloody IE!!!!

 

I can now change quantities and delete items, click Update and it works. Yippee! I'd still like to resolve the IE/update button and IE and firefox/AJAX problem though. I'd welcome any suggestions :)

 

Max

Share this post


Link to post
Share on other sites
Go to Admin->Tools->Server info and find there what the Local Value of register_globals is.

 

Hi DJ,

 

The local value of register_globals is on.

 

Cheers,

Max

Share this post


Link to post
Share on other sites
Hi DJ,

 

The local value of register_globals is on.

 

Cheers,

Max

 

Try this- open admin/edit_orders_ajax.php, scroll all the way to the bottom, and find this code:

	<?php } //end if ($action == 'new_order_email')  {  ?>

 

Change it to this:

	<?php } //end if ($action == 'new_order_email')  {  
echo 'Hello world!'; ?>

 

Then try an edit and see what you get.


Do, or do not. There is no try.

 

Order Editor 5.0.6 "Ultra Violet" is now available!

For support or to post comments, suggestions, etc, please visit the Order Editor support thread.

Share this post


Link to post
Share on other sites

Hello,

 

in switzerland i need accentued characters in words ex: écouter and when i wright a new status or comment, the word is écouter ...

only when in the admin box of Order Editor "Allow the use of AJAX to update order information? " is TRUE

else if AJAX is on "FALSE" all is OK?

 

Have you an idea?

 

Thank you

 

(Before we begin I would like to add that if you are having encoding issues like this one you can avoid them altogether without any further ado by setting 'Allow the use of AJAX to update order information?' to "false" at Admin->Configuration->Order Editor. However, if you do this, you won't be able to enjoy all the neato benefits of using the AJAX features. So, if AJAX is the thing for you, please continue reading.)

 

As VaM and yedle have shown us, this is not a problem with the JavaScript function encodeURIComponent; rather it is an issue of conflict between whatever CHARSET you are using and the fact that XMLHttpRequest encodes data sent to the server in UTF-8 (UTF-8 is a nearly universal multilingual character encoding that is rapidly becoming the standard method of encoding characters throughout the world of email and the internet. osCommerce 3.0, for example, is encoded in UTF-8). So if you have a charset of, say, ISO 8859-1, but then use AJAX to submit a word like "écouter" to the server, it ends up being displayed as "écouter". The reason is that the AJAX encodes the "é" in UTF-8, but ISO 8859-1 interprets that encoded value as "é".

 

The first thing we have to do is make sure that Order Editor is using the corrrect user-defined CHARSET. This is done, as VaM has suggested, by finding in edit_orders_ajax.php v5.0, v5.0.1, or v5.0.2 (this is a bug that will be fixed as of the soon to be released v5.0.3) the code

  // output a response header
			   header('Content-type: text/html; charset=ISO-8859-1');

			   require('includes/application_top.php');

and changing it to:

  require('includes/application_top.php');

			   // output a response header
			   header('Content-type: text/html; charset=' . CHARSET . '');

 

This, however, will not solve all your AJAX encoding problems, because your CHARSET is probably not UTF-8. You can find your CHARSET settings for the admin and catalog sides, independently, at includes/languages/*.php where * is whatever language(s) you have defined on your site; the reason for this is that each different language could have its own CHARSET. The code you're looking for will look something like this:

// charset for web pages and emails
   define('CHARSET', 'iso-8859-1');

To change it to UTF-8 you would replace that with

// charset for web pages and emails
   define('CHARSET', 'UTF-8');

You can probably change all of your CHARSETs to UTF-8 and get away with it. In fact, in the long run, you'll probably be better off if you do. UTF-8 works with a huge number of languages; the odds that UTF-8 doesn't support your language are pretty slim, and if it doesn't and you deal with website design you probably already know.

 

The problem with switching, especially if you have an established website, is that all of the characters you've typed into your product descriptions, currency symbols, etc, are encoded in whatever CHARSET you had before, and might appear differently when rendered in UTF-8. For instance if you use GBP as one of your currencies you probably have this as the currency symbol: £. If you entered that in your database using iso-8859-1 then switched to UTF-8, the pound symbol will then show up as a question mark (?) and you will have to re-enter it into the database in order for it to appear properly. On my english language sandbox site this is the only problem that I ran into when changing over to UTF-8, however the number of symbols and characters that this kind of problem can occur with goes up exponentially with various languages; for an example see the screenshots posted by yedle. Probably, if your website is already established and written using the Cyrillic alphabet, you don't want this sort of thing happening on every page of your website, unless you're looking for something to do.

 

Another possibility is using or writing a function that will convert the data from UTF-8 back to your CHARSET. The problem here is that it requires custom coding for each different encoding. The PHP module/function iconv should be able to handle this but doesn't support all encodings and is not yet widely available (it is included by default with PHP 5.0).

 

So, yes, this can be fixed, but not necessarily easily.


Do, or do not. There is no try.

 

Order Editor 5.0.6 "Ultra Violet" is now available!

For support or to post comments, suggestions, etc, please visit the Order Editor support thread.

Share this post


Link to post
Share on other sites
Try this- open admin/edit_orders_ajax.php, scroll all the way to the bottom, and find this code:
	<?php } //end if ($action == 'new_order_email')  {  ?>

 

Change it to this:

	<?php } //end if ($action == 'new_order_email')  {  
echo 'Hello world!'; ?>

 

Then try an edit and see what you get.

 

Hi DJ,

 

This didn't produce an output - however, here's something interesting. Recalling something I'd read in an earlier post about replacing 'require' statements with 'include' statements, and that doing this had fixed some other problem I'd experienced with this contribution, I did the same in edit_orders_ajax.php. And voila! IT WORKS!!!!!!!!!!!!!!! Maxxxie is a happy girl :)

 

Yippeeeee!!!

 

One last thing - when I turn off Ajax and use IE to edit the order, I still get the problem of the missing Update button. However, my care factor for this right now is approximately zero :)

 

DJ, your assistance has been very much appreciated. I can't remember the last time I encountered someone who was so responsive with troubleshooting their contribution :D

 

Max

Share this post


Link to post
Share on other sites
Go to Admin->Configuration->Order Editor->"Select your credit card payment method"->select your credit card payment method->In Order Editor, when you select your credit card payment method, the fields for storing cc info appear. Order Editor is not a payment module, however. Actually processing the credit card payment is up to you.

 

Thank you for the quick reply. That works for orders placed through the cart but does not work when a new order is placed in admin using Manual Order Maker. Manual Order Maker opens a blank Order Entry. I assume that Order Entry only displays Credit Card information if it is already stored in the database and will not show the fields if no information is in the database. I am using the RC1 version of Oscommerce. Would that make a difference?

Share this post


Link to post
Share on other sites
Thank you for the quick reply. That works for orders placed through the cart but does not work when a new order is placed in admin using Manual Order Maker. Manual Order Maker opens a blank Order Entry. I assume that Order Entry only displays Credit Card information if it is already stored in the database and will not show the fields if no information is in the database. I am using the RC1 version of Oscommerce. Would that make a difference?

 

Nevermind. When I switched from the default Credit Card payment method to the Payment Module for my Gateway, the credit card fields became visible.

Share this post


Link to post
Share on other sites
Hello,

 

I like the new update and how it gets the shipping prices! Nice work.

 

One comment, not an issue, but if I was to write in the comments box that I have credited a customer £20 for example, once it is updated it adds a funny capital  infront of the pound sign, which it never used to

 

Thanks

 

Dave

 

This is the UTF-8 bug. See my previous post for more on this topic.


Do, or do not. There is no try.

 

Order Editor 5.0.6 "Ultra Violet" is now available!

For support or to post comments, suggestions, etc, please visit the Order Editor support thread.

Share this post


Link to post
Share on other sites

djmonkey1

 

This is the real problem with encoding.

Many and many shops not in utf-8, but XMLHttpRequest works in UTF-8 (order comments, shipping/payment/order total options, all of this info's not readable).

 

Maybe use iconv to convert text CHARSET <-> UTF-8 or something else?!

Edited by VaM

Share this post


Link to post
Share on other sites
djmonkey1

 

This is the real problem with encoding.

Many and many shops not in utf-8, but XMLHttpRequest works in UTF-8 (order comments, shipping/payment/order total options, all of this info's not readable).

 

Maybe use iconv to convert text CHARSET <-> UTF-8 or something else?!

 

Yes, you are correct.

 

The problem with iconv is that it is apparently not widely available and does not support, as far as I know, all the various encoding schemes. If you have iconv installed on your server this is definitely something to look into however.

 

Here's another solution: encode the "boxed" version of osCommerce in UTF-8!


Do, or do not. There is no try.

 

Order Editor 5.0.6 "Ultra Violet" is now available!

For support or to post comments, suggestions, etc, please visit the Order Editor support thread.

Share this post


Link to post
Share on other sites

Or maybe change XMLHttpRequest to another ajax library.

For example - JsHttpRequest - http://dklab.ru/lib/JsHttpRequest/

Russian documentation (maybe use babelfish.altavista.com to translate) - http://dklab.ru/lib/JsHttpRequest/manual.html

Short english documentation - http://dklab.ru/lib/JsHttpRequest/protocol.html

 

But this way is too hard, i think.

Share this post


Link to post
Share on other sites
Or maybe change XMLHttpRequest to another ajax library.

For example - JsHttpRequest - http://dklab.ru/lib/JsHttpRequest/

Russian documentation (maybe use babelfish.altavista.com to translate) - http://dklab.ru/lib/JsHttpRequest/manual.html

Short english documentation - http://dklab.ru/lib/JsHttpRequest/protocol.html

 

But this way is too hard, i think.

 

That looks like the way to go to my eyes:

Support and "transparent" work with any character encoding (including any national). You may write your scripts in a usual way, library will take care about everything else.

 

I will look into this one more.


Do, or do not. There is no try.

 

Order Editor 5.0.6 "Ultra Violet" is now available!

For support or to post comments, suggestions, etc, please visit the Order Editor support thread.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×