Jump to content


Corporate Sponsors


Latest News: (loading..)

* * * * * 6 votes

NEW! Complete Order Editing Tool!


3242 replies to this topic

#3041 wvdbroek

  • Community Member
  • 12 posts
  • Real Name:W v/d Broek

Posted 25 January 2010, 17:20

hi you all

is there anyone out there who knows how to get rid of the zones in Edit_orders and Edit_orders_ajax

i mean when i go the edit the order its suddenly show the zones and we have only All zones so this is not nessesary in fact its anoying.

see picture
[img]http://www.wvdbroek.com/zones.jpg[/img]

Edited by wvdbroek, 25 January 2010, 17:20.


#3042 nathanwheeler

  • Community Member
  • 24 posts
  • Real Name:Nathan

Posted 26 January 2010, 17:48

Setup: Order_editor latest with manual order contribution that only works when order_editor is installed.

Going fine scenario's:
--> frontend order --> details + edit: sort order of total is as we have it in modules --> order totals: module sort orders
1: subtotal
2: loworderfee
3: total
4: tax
*tax=4 last which is OK / the way we want it really.

I can add products after which the order editor updates fine.

But now:
--> use the manual order mod --> select a client --> continue --> Order totals all show 0,00 and in the right sort order.
--> then I add a product --> order_editor updates BUT now changes the sort order somehow ( checked also in dbase and indeed, sort order values are changed in orders_total
NOW TAX is first instead of last....
after all are ok.

Don't think it is the manual order mod but something in the order_editor when order totals are 0 ?

Thanks!

Kookie

#3043 demiati

  • Community Member
  • 12 posts
  • Real Name:Carl Ciappessoni
  • Location:Spain

Posted 29 January 2010, 22:28

View PostDenkster, on 03 January 2010, 22:46, said:

Hi,
Can you please help me with this?

I installed contri 1435 OrderEditor version 5.0.9,
on a OsC rc2a with Super Download shop, iDeal, Paypal IPN.
My dialog for edit orders
1. Misses the 'submit' buttons
2. shows the next text 3 times:

Warning: number_format() expects parameter 1 to be double, string given in C:\Server\www\myserver.dev\public_html\winkel\admin\edit_orders.php on line 1737


This is the piece of code around line 1737 in edit_order.php
if (ORDER_EDITOR_USE_AJAX == 'true') { echo
'   <td align="right" class="dataTableContent">' . "\n" .
'     <input name="update_totals['.$i.'][title]" id="'.$id.'[title]" value="'
         . trim($order->totals[$i]['title'])
         . '" onChange="obtainTotals()"></td>' . "\n" .
'   <td align="right" class="dataTableContent">' . "\n" .
'     <input name="update_totals['.$i.'][value]" id="'.$id.'[value]" value="'
         . number_format($order->totals[$i]['value'], 2, '.', '')
         . '" size="6" onChange="obtainTotals()"></td>' . "\n" .
'   <td align="right" class="dataTableContent">' . "\n" .
'     <input name="update_totals['.$i.'][class]" type="hidden" value="'
         . $order->totals[$i]['class'] . '"></td>' . "\n" .
'   <td align="right" class="dataTableContent">' . "\n" .
'    <input name="update_totals['.$i.'][id]" type="hidden" value="'
         . $shipping_module_id . '" id="' . $id . '[id]"></td>' . "\n";
} else { echo
'   <td align="right" class="dataTableContent">' . "\n" .
'     <input name="update_totals['.$i.'][title]" id="'.$id.'[title]" value="'
         . trim($order->totals[$i]['title']) . '"></td>' . "\n" .
'   <td align="right" class="dataTableContent">' . "\n" .
'     <input name="update_totals['.$i.'][value]" id="'.$id.'[value]" value="'
         . number_format($order->totals[$i]['value'], 2, '.', '')
         . '" size="6">' . "\n" .
'     <input name="update_totals['.$i.'][class]" type="hidden" value="'
         . $order->totals[$i]['class'] . '">' . "\n" .
'     <input name="update_totals['.$i.'][id]" type="hidden" value="'
         . $shipping_module_id . '" id="' . $id . '[id]"></td>' . "\n";
}
AFAIK the warning means that number_format($order->totals[$i]['value'], 2, '.', '') in the if statement before else is wrong, because $order->totals[$i]['value'] seems to be a string, while a 'double numeric' is required.

What can I do to avoid the warnings?
These warnings completely destroy the lay out.

This is my development configuration:
MySQL

* Server: MySQL host info: 127.0.0.1 via TCP/IP
* Serverversie: 5.1.41-community
* Protocolversie: 10
* Gebruiker: XXXXXXXXX@localhost
* MySQL Karakterset: UTF-8 Unicode (utf8)

Web server

* Apache/2.2.14 (Win32) PHP/5.3.1
* MySQL-client versie: mysqlnd 5.0.5-dev - 081106 - $Revision: 289630 $
* PHP uitbreiding: mysql

Thanks in advance for your help!
Eveline
Hi Eveline,
I have to admit that I have virtually no knowledge of programming, but if it is of help you can edit the admin\includes\application_top.php and change the level of error reporting thus:

error_reporting(E_NONE);

It's near the top of the file I think.

This surpresses the error, but doesn't cure the problem. I have the same problem with my site, so if you fin dout what the cause is, please let me know.

Good luck,
Carl

#3044 bhbilbao

  • Community Member
  • 291 posts
  • Real Name:BLACKHOLE
  • Gender:Male
  • Location:Spain

Posted 03 February 2010, 13:20

Need help.

This was wonderfull working until now. When I click "Send an order confirmation Button" gets this error:

Fatal error: Cannot redeclare do_magic_quotes_gpc() (previously declared in /homepages/6/d308676125/htdocs/admin/includes/functions/compatibility.php:18) in /homepages/6/d308676125/htdocs/admin/includes/functions/compatibility.php on line 30

I dont know what is the problem because there was working perfect until I instaled SPPC or Header Tags.

Contribution instaled order:
ORDER EDITOR 5.0.9 > Administration access level acounts > SPPC > HIDE PRODUCTS FOR SPPC > SPECIALS FOR SPPC > SUPPLIER ADMIN AREA > ULTIMATE SEO URLS5 > HEADER TAGS SEO

Any suggestion?

#3045 bhbilbao

  • Community Member
  • 291 posts
  • Real Name:BLACKHOLE
  • Gender:Male
  • Location:Spain

Posted 03 February 2010, 13:56

The button is this:
<div class="update4" align="center"><?php echo ENTRY_SEND_NEW_ORDER_CONFIRMATION; ?>&nbsp;<?php echo tep_draw_checkbox_field('nC1', '', false); ?></div>
              <div class="update5" align="center"><?php echo tep_image_submit('button_update.gif', IMAGE_UPDATE); ?></div>

The function that dosn´t work is this:
	// CHECK FOR NEW EMAIL CONFIRMATION

    if ( (isset($_POST['nC1'])) || (isset($_POST['nC2'])) || (isset($_POST['nC3'])) ) {
	//then the user selected the option of sending a new email
    
    tep_redirect(tep_href_link(FILENAME_ORDERS_EDIT, tep_get_all_get_params(array('action')) . 'action=email')); 
	//redirect to the email case
	 
  } else  { 
     //email? email?  We don't need no stinkin email!
	 
	 if ($order_updated)	{
			$messageStack->add_session(SUCCESS_ORDER_UPDATED, 'success');
		}

		tep_redirect(tep_href_link(FILENAME_ORDERS_EDIT, tep_get_all_get_params(array('action')) . 'action=edit'));
		
		}
		
	break;
		
	// 3. NEW ORDER EMAIL ###############################################################################################
	case 'email':
          
		$oID = tep_db_prepare_input($_GET['oID']);
		$order = new manualOrder($oID);


,,,,

,,,,



#3046 hobbynet

  • Community Member
  • 12 posts
  • Real Name:Peter Roth
  • Gender:Male
  • Location:Aarburg, Switzerland

Posted 04 February 2010, 14:47

Hi,

First of all I like to thanks to all developers created this great contribution. Without it the work with creating order or modifying it can be a pain.

Idea for a enhancement:
By default the contribution has the possibility to define which total modules are added by default for a new manual created order. But, in 90% some total modules e.g. discount wont be used for a "normal" order.

By default I'm using the totals as follows in the total section:

Subtotal
Shipping
including Tag %
Total Net withou Tax
Rounding difference
Total

But some time I need to add a new line in the total for "discount". I'm doing this by click on the "+", type "Discount 5%" in the title and the related value. Everything goes well and the order will be calculated and stored correctly.
But, take a look into the orders_total table for the created order. The new discount line becomes a class = ot_custom_xy and a sort_order=xy. In my point of view this is wrong. Why? The discount module has a defined title, class=ot_customer_discount and a sort_order=3. To make sure all the calculation in the reports or stats will get the correct values, you have to modify the class and for the correct printing in "invoice" you have to modify the sort_order. Else the discount will be placed above the Subtotal.

My idea:
Is it possible to enhance the total section in a way to select the available total modules from within a dropdown? With this all the related values for class, sort_order, title will get the defined values automatically. The dropdown must also have the possibility to type in a free text. The code logic has to handle it as: if the text can't be found from the list of available modules the title will be set as type in, the class can be set to ot_custom_xy and the sort_order can be set to xy.

This is what I like to enhance in the order editing tool and I like to ask you about idea how to implement it.

I'm looking forward to read some lines about.

regards

peter

#3047 zipicip

  • Community Member
  • 54 posts
  • Real Name:Zip

Posted 26 February 2010, 08:51

Problem with state selection:

That problem goes that way:

Let's say u don't use a dropdown selection for state when customers create an account or u added this future after accounts where already created.

When u modify an order first on state field take the customer state . But if this state it isn't on the list when u update your order it takes the first state on the list not the state the customer put .

That is because

$update_customer_state = tep_get_zone_name($_POST['update_customer_country_id'], $_POST['update_customer_zone_id'], $_POST['update_customer_state']);


<tr class="dataTableRow">
<td class="dataTableContent" valign="middle" align="right" nowrap><?php echo ENTRY_CITY_STATE; ?></td>
<td colspan="2" valign="top" class="dataTableContent" nowrap><input name="update_customer_city" size="15" value="<?php echo stripslashes($order->customer['city']); ?>" <?php if (ORDER_EDITOR_USE_AJAX == 'true') { ?>onChange="updateOrdersField('customers_city', encodeURIComponent(this.value))"<?php } ?>>,</td>
<td valign="top" class="dataTableContent"><span id="customerStateMenu">
<?php if (ORDER_EDITOR_USE_AJAX == 'true') {
echo tep_draw_pull_down_menu('update_customer_zone_id', tep_get_country_zones($order->customer['country_id']), $order->customer['zone_id'], 'style="width: 200px;" onChange="updateOrdersField(\'customers_state\', this.options[this.selectedIndex].text);"');
} else {
echo tep_draw_pull_down_menu('update_customer_zone_id', tep_get_country_zones($order->customer['country_id']), $order->customer['zone_id'], 'style="width: 200px;"');
}?></span><span id="customerStateInput"><input name="update_customer_state" size="15" value="<?php echo stripslashes($order->customer['state']); ?>" <?php if (ORDER_EDITOR_USE_AJAX == 'true') { ?>onChange="updateOrdersField('customers_state', encodeURIComponent(this.value))"<?php } ?>></span></td>
</tr>

There will always get the first state and when post will verify if state equal 1 and it is always true .

U need to make something like this:

$array_zones = tep_get_country_zones($order->customer['country_id']) ;

but in the select must be a default value: Something like Select a state : ... with id = - 1 .... so when u use post

$update_customer_state = tep_get_zone_name($_POST['update_customer_country_id'], $_POST['update_customer_zone_id'], $_POST['update_customer_state']);

If the customer state wasn't in the list of state the default value from the customer will be selected


Hope someone will implement this so everybody will understand.

A good day.


My solution:

<tr class="dataTableRow">
<td class="dataTableContent" valign="middle" align="right" nowrap><?php echo ENTRY_CITY_STATE; ?></td>
<td colspan="2" valign="top" class="dataTableContent" nowrap><input name="update_customer_city" size="15" value="<?php echo stripslashes($order->customer['city']); ?>" <?php if (ORDER_EDITOR_USE_AJAX == 'true') { ?>onChange="updateOrdersField('customers_city', encodeURIComponent(this.value))"<?php } ?>>,</td>
<td valign="top" class="dataTableContent"><span id="customerStateMenu">
<?php if (ORDER_EDITOR_USE_AJAX == 'true') {
$zones_array = array();
$zones_query = tep_db_query("select zone_id, zone_name from " . TABLE_ZONES . " where zone_country_id = ". (int) $order->customer['country_id']. " order by zone_id");
$zones_array[0] = array('id' => '-1', 'text' => 'Select state');

while ($zones_values = tep_db_fetch_array($zones_query)) {
$zones_array[] = array('id' => $zones_values['zone_id'], 'text' => $zones_values['zone_name']);
}

echo tep_draw_pull_down_menu('update_customer_zone_id', $zones_array, $order->customer['zone_id'], 'style="width: 200px;" onChange="updateOrdersField(\'customers_state\', this.options[this.selectedIndex].text);"');
} else {
$zones_array = array();
$zones_query = tep_db_query("select zone_id, zone_name from " . TABLE_ZONES . " where zone_country_id = ". (int) $order->customer['country_id']. " order by zone_id");
$zones_array[0] = array('id' => '-1', 'text' => 'Select state');

while ($zones_values = tep_db_fetch_array($zones_query)) {
$zones_array[] = array('id' => $zones_values['zone_id'], 'text' => $zones_values['zone_name']);
}
echo tep_draw_pull_down_menu('update_customer_zone_id', $zones_array, $order->customer['zone_id'], 'style="width: 200px;"');
}?></span><span id="customerStateInput"><input name="update_customer_state" size="15" value="<?php echo stripslashes($order->customer['state']); ?>" <?php if (ORDER_EDITOR_USE_AJAX == 'true') { ?>onChange="updateOrdersField('customers_state', encodeURIComponent(this.value))"<?php } ?>></span></td>
</tr>

Edited by zipicip, 26 February 2010, 08:59.


#3048 homescollection

  • Community Member
  • 3 posts
  • Real Name:Homes Collections Limited

Posted 02 March 2010, 13:03

Ok installed this. all works but one issue.
When i cleck on new order email i get the dialog to ask if i want to send the email. i say yes and i get the error below.
My update is however all saved. Everything is ok except this error
Any help please?


1146 - Table 'store1.eorder_text' doesn't exist

SELECT * FROM eorder_text where eorder_text_id = '1' and language_id = '1'


#3049 mirage101

  • Community Member
  • 36 posts
  • Real Name:Ivan Filipov

Posted 03 March 2010, 10:54

I use version 5.09b and have a problem with shipping quotes, I have 4 flat rates shipping options, displaying is fine only that they appear without selected option. But when I like to change shipping option nothing happens, when I hit update.Shipping option in field above total stay the same and the value too. I tried both with ajax or without I have the same error too with warning: number_format() expects parameter 1 to be double

#3050 fmosse

  • Community Member
  • 7 posts
  • Real Name:Francisco

Posted 04 March 2010, 01:16

I have installed ORDER EDITOR 5.05
and I am getting this error when I enter to EDIT any order and press in NEW ORDER EMAIL.

Fatal error: Call to undefined function tep_add_base_ref() in /home/xxxx/public_html/compras/admin/edit_orders_ajax.php on line 1144

I have downloaded and updated the module to order_editor_5_0_9
but I still get the error.

I have searched all .php files in my oscommerce and the funcion tep_add_base_ref
doesn´t exist IN ANY OF ALL THE FILES.

What can I do?
Thanks!
Francisco

#3051 fmosse

  • Community Member
  • 7 posts
  • Real Name:Francisco

Posted 04 March 2010, 01:18

I have installed ORDER EDITOR 5.05
and I am getting this error when I enter to EDIT any order and press in NEW ORDER EMAIL.

Fatal error: Call to undefined function tep_add_base_ref() in /home/xxxx/public_html/compras/admin/edit_orders_ajax.php on line 1144

I have downloaded and updated the module to order_editor_5_0_9
but I still get the error.

I have searched all .php files in my oscommerce and the funcion tep_add_base_ref
doesn´t exist IN ANY OF ALL THE FILES.

What can I do?
Thanks!
Francisco

#3052 hostricity

  • Community Member
  • 18 posts
  • Real Name:Geoff Staples

Posted 14 March 2010, 00:05

Installed latest version and have this problem:

[indent]1146 - Table 'test_oscommerce.eorder_text' doesn't exist

SELECT * FROM eorder_text where eorder_text_id = '1' and language_id = '1'
[/indent]

I've seen the comments about adding "Send HTML Email V2" - Is this the add-on that's needed?
http://addons.oscommerce.com/info/1091

If so, there's more to the solution than installing "Send HTML Email V2" because this add-on doesn't create the eorder_text table.

Which Add-On creates the eorder_text table and inserts the required data?

I've even seen some comments here with the sql to create the eorder_text table, but if I simply add that table, I still don't know what data to insert.

So, I will ask the questions that many here seem to want answered, again:

1. Do we need to install "Send HTML Email V2" and if so, is this the Add-On that's needed?
http://addons.oscommerce.com/info/1091

2. Which Add-On creates the eorder_text table and populates it?

3. If the eorder_text table is not created by an add-on, then what data do we need to put in it?

Edited by hostricity, 14 March 2010, 00:08.


#3053 surfalot

  • Community Member
  • 2,295 posts
  • Real Name:Todd Holforty
  • Gender:Male
  • Location:I'm right here!

Posted 14 March 2010, 23:54

you can avoid all of that and use the last one I uploaded, which works without all this garbage. Several folks since my upload have dumped their versions (with problems) and ran without supporting them.

#3054 erikesq777

  • Community Member
  • 3 posts
  • Real Name:Erik

Posted 23 March 2010, 05:11

View Postsurfalot, on 14 March 2010, 23:54, said:

you can avoid all of that and use the last one I uploaded, which works without all this garbage. Several folks since my upload have dumped their versions (with problems) and ran without supporting them.

Surfalot - I installed your version of Order Editor and it works great. I tried to install the version 5.0.8 upgrade (not created by you) so the Order Editor would work with the HTML Email contribution and it did not work. Is there an easy way to get these two contributions Order Editor 5.0.7 and HTML Email to work together.

Thanks,

#3055 puvens

  • Community Member
  • 17 posts
  • Real Name:Peter

Posted 23 March 2010, 19:32

surfalot:
I got that problem to, and also I have your version 5.09b (28 feb 2010) :

1146 - Table 'test_oscommerce.eorder_text' doesn't exist
SELECT * FROM eorder_text where eorder_text_id = '2' and language_id = '4'

that message only shows when i choose "new order confirmation" and then "update" without ajax
(if i onlu push on "update" without "neworderconfirm" checked, it works fine)

With ajax "allow the use of ajax to update order information" set to true i get this message:
(i have qtpro 4.51a+ alots a bugfixs installed)
(i have "send admin html e-mails 1.5")

Message: Odefinierat fel
Rad: 305
Tecken: 3
Kod: 0
URI: http://www.xxxxx.se/admin/edit_orders.php?oID=39&osCAdminID=54720248574e1be4b1005968b06746dc

and

Message: Unknown runtime error
Rad: 201
Tecken: 3
Kod: 0
URI: http://www.xxxxx.se/admin/edit_orders.php?oID=39&osCAdminID=54720248574e1be4b1005968b06746dc

Do you have any ideas how i can solve this problems?

#3056 puvens

  • Community Member
  • 17 posts
  • Real Name:Peter

Posted 23 March 2010, 19:46

in edit_orders.php, the line 305 is:

from products_options po, products_options_values pov, products_options_values_to_products_options po2pov, orders_products_attributes opa, orders_products op

and line 201 is:

//Send text email

#3057 chap

  • Community Member
  • 15 posts
  • Real Name:chap

Posted 29 March 2010, 07:34

Great contribution! I just installed this Add-on, it's great, and is the easiest install! All add-ons should be this easy to install!

I installed this Add-on because I wanted to be able to change a product's price to a negative value. But, simply changing the price to a negative value doesn't have the desired outcome.

Example: I have an order in OSC. This order has Product1 and Product2 in it. Product1 is normally $20, and Product2 is $29.99. I go into Order Editor and change Product1's cost to negative $40. The total SHOULD be negative $10.01. But the total is $69.98.

Also, if the calculation for the total uses absolute values, the total should be $69.99, why is it $69.98?


Help please, thanks!


Chap

Edited by chap, 29 March 2010, 07:35.

Eagerly awaiting 2.2

#3058 stryke23x

  • Community Member
  • 3 posts
  • Real Name:john janowitz

Posted 30 March 2010, 15:31

Hi, sorry if this has been covered but i get so many results when searching but not finding what I need.

We have the order editing setup on the site. However, a customer can have a pending order in with a request for quote, we can edit it to include the appropriate shipping amount, but then there is no way for them to get back on to "complete" this order or check out. Is there a way that people can get back in to pay for their pending order after it has been edited?

John

#3059 wycodeiwyg

  • Community Member
  • 12 posts
  • Real Name:wycodeiwyg

Posted 08 April 2010, 22:38

Thanks for a much-needed addition! Great installation directions!
Two related questions to REFUNDS.

ONE

What is the best way to post a refund without deleting the original entry? I tried but the original entry deleted, although everthing appears to be working fine.

A similar request is in post #598 / djmonkey1 from march 2006. A coding change was recommended then but I was wondering best course of action for refund now.
Maybe I should have added another transaction for negative amount. Help to properly post a refund is appreciated.

TWO

I was thinking that what should happen is that we add a couple more statuses to the database (Refund, Void, etc.), because to have a final status of Delivered doesn't make sense and deleting a transaction where money changed hands doesn't either. Adding the fields is easy, but to make them work properly the challenge. This contribution addresses a lot of needed areas and is a great tool. I am not familiar with the extent of all this code...would a few more statuses work with this contribution or am I thinking of all this wrong.

Thanks
What you CODE is what you get
wycodeiwyg

#3060 nedragdnuos

  • Community Member
  • 31 posts
  • Real Name:nedragdnuos

Posted 10 April 2010, 11:34

Hi all,

In regards to the following error that was posted previously:

Warning: number_format() expects parameter 1 to be double, string given in C:\Server\www\myserver.dev\public_html\winkel\admin\edit_orders.php on line 1737

Im just wondering if anyone has found an actual solution to this error rather than just using the E_NONE ignore thingy in application_top.php (which then in itself brings up another error:

Notice: Use of undefined constant E_NONE - assumed 'E_NONE' in H:\wamp\www\catalog\admin\includes\application_top.php on line 17



Any help would be appreciated.

Cheers!