Jump to content
jhilgeman

NEW! Complete Order Editing Tool!

Recommended Posts

ok - new version 1.2.8 just uploaded which installs on Phoenix 1.0.4.0 with no core changes.

https://apps.oscommerce.com/Apps&wwEZ9&order-editor-for2-3-v1-0

Functionally the same as 1.2.7 but with an extra option that allows you choose whether to change the Edit button in the order list info panel or not. Extra option self-installs when you run the editor.

If you already made core changes on Phoenix 1.0.4.0 you'll need to reverse them or you'll get errors.


For a new install or if your store isn't mobile-friendly, get the community-supported responsive osCommerce (Phoenix).

here: on the official osc download page

Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x

Share this post


Link to post
Share on other sites

On Phoenix 1.0.4.1 New install of addon

If I have the "Change Order List Button" set to false, which I prefer, when I click edit from within the actual order, the edit screen opens in in a new browser tab. This does not happen if the button option is set true.

Is this correct?


Live Phoenix 1.0.5.0 on PHP 7.3

Is your version of osC up to date? You'll find the latest osC community version (CE Phoenix 1.0.5.0) here.

Share this post


Link to post
Share on other sites

The newest version is all working on my Phoenix 1.0.4.0.  However, I had some issues in the database.

It's probably something I did because in my case it was updating - not a new install.  You might want to check your sql_uninstall.sql file and update it.  I had some issues with a double listing of "Order Editor" under the admin Configuration menu.  I did not go through the sql_uninstall file because it seems there are references that don't apply, but went back and manually deleted the double entry in the configuration_group table in PHPadmin.  I deleted the other "ORDER_EDITOR_XXX entries in the configuration table, except for the "ADD_PDF_INVOICE_EMAIL" entry.   That does not show up in the Configuration entries for Order Editor.  I guess it's obsolete?

Share this post


Link to post
Share on other sites
On 12/27/2019 at 5:16 PM, mhsuffolk said:

On Phoenix 1.0.4.1 New install of addon

If I have the "Change Order List Button" set to false, which I prefer, when I click edit from within the actual order, the edit screen opens in in a new browser tab. This does not happen if the button option is set true.

Is this correct?

It seems unlikely that the tab opening is dependent on the list setting as it's hard-coded always to do it (that's how it was before). I could make it optional...


For a new install or if your store isn't mobile-friendly, get the community-supported responsive osCommerce (Phoenix).

here: on the official osc download page

Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x

Share this post


Link to post
Share on other sites
23 hours ago, TomB01 said:

The newest version is all working on my Phoenix 1.0.4.0.  However, I had some issues in the database.

It's probably something I did because in my case it was updating - not a new install.  You might want to check your sql_uninstall.sql file and update it.  I had some issues with a double listing of "Order Editor" under the admin Configuration menu.  I did not go through the sql_uninstall file because it seems there are references that don't apply, but went back and manually deleted the double entry in the configuration_group table in PHPadmin.  I deleted the other "ORDER_EDITOR_XXX entries in the configuration table, except for the "ADD_PDF_INVOICE_EMAIL" entry.   That does not show up in the Configuration entries for Order Editor.  I guess it's obsolete?

That should show up in the configuration group - I guess it means that your original settings didn't have it and you've left it with the second config group id. When you did the update did you get a redirect with a message telling you there were new settings and to check them? It checks for a pre-existing install by looking for one of the settings being defined. I've just put in a change to test a different config (ORDER_EDITOR_USE_AJAX) which should be present in any existing installation of any age.

I confess I'd not looked at the uninstall sql since updating the addon. I've now redone it to take out any and all configs and groups for the editor.


For a new install or if your store isn't mobile-friendly, get the community-supported responsive osCommerce (Phoenix).

here: on the official osc download page

Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x

Share this post


Link to post
Share on other sites

@BrockleyJohn

I'm quite certain it's something I did.😖  Your update was quite professional in action and with the message!

I only mentioned the SQL because it might've prevented the tiny issue I had and needed a bit of an update.

Again, many thanks for the update and sterling work.  You can't run a store if you can't edit invoices from time to time.

Share this post


Link to post
Share on other sites

Hello John,

Just installed the new version and get these errors when sending an email confirmation

 

Warning: Use of undefined constant FILENAME_EMAIL_ORDER_TEXT - assumed 'FILENAME_EMAIL_ORDER_TEXT' (this will throw an Error in a future version of PHP) in /xxx/xx/xx/xxx/admin/edit_orders_ajax.php on line 1041

Warning: Use of undefined constant FILENAME_EMAIL_ORDER_TEXT - assumed 'FILENAME_EMAIL_ORDER_TEXT' (this will throw an Error in a future version of PHP) in xxx/xx/xx/xxx/admin/edit_orders_ajax.php on line 1041

Warning: Use of undefined constant FILENAME_CATALOG_ACCOUNT_HISTORY_INFO - assumed 'FILENAME_CATALOG_ACCOUNT_HISTORY_INFO' (this will throw an Error in a future version of PHP) in xxx/xx/xx/xxx/admin/edit_orders_ajax.php on line 1115

Warning: Use of undefined constant FILENAME_PDF_INVOICE - assumed 'FILENAME_PDF_INVOICE' (this will throw an Error in a future version of PHP) in xxx/xx/xx/xxx/admin/edit_orders_ajax.php on line 1164

Share this post


Link to post
Share on other sites

Oh... also note that the email sent has an error stemming from line 1115:

                                          EMAIL_TEXT_INVOICE_URL . ' ' . tep_catalog_href_link(FILENAME_CATALOG_ACCOUNT_HISTORY_INFO, 'order_id=' . (int)$oID, 'SSL') . "\n" .

which gives the customer a 404 error when clicking the link

Share this post


Link to post
Share on other sites

@artfulweb please give this one a try - all those should be fixed

edit_orders_ajax.php


For a new install or if your store isn't mobile-friendly, get the community-supported responsive osCommerce (Phoenix).

here: on the official osc download page

Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x

Share this post


Link to post
Share on other sites

Me again John. Switched to the French admin to edit an order and got this :

 

1267 - Illegal mix of collations (utf8_general_ci,IMPLICIT) and (utf8_unicode_ci,IMPLICIT) for operation '='

select distinct op.products_id, po.products_options_id, pov.products_options_values_id from products_options po, products_options_values pov, products_options_values_to_products_options po2pov, orders_products_attributes opa, orders_products op where op.orders_id = '2' and op.orders_products_id = '2' and products_options_values_name = opa.products_options_values and pov.products_options_values_id = po2pov.products_options_values_id and po.products_options_id = po2pov.products_options_id and products_options_name = opa.products_options

[TEP STOP]

 

Never had this thrown on the older versions. Database has not changed. ANy ideas ?

Share this post


Link to post
Share on other sites

If you use phpMyAdmin, you might check what collation the columns in the products_options and orders_products_attributes tables are using.  You could also go to admin > Tools > Database Tables and use the convert to UTF8 option.  But if you try that, back up first. 


Always back up before making changes.

Share this post


Link to post
Share on other sites
2 minutes ago, ecartz said:

If you use phpMyAdmin, you might check what collation the columns in the products_options and orders_products_attributes tables are using.  You could also go to admin > Tools > Database Tables and use the convert to UTF8 option.  But if you try that, back up first. 

All is good there. 

Share this post


Link to post
Share on other sites
Just now, artfulweb said:

All is good there. 

What does that mean?  What collation(s) is it showing?  Note that it is possible for each column to use a different collation.  If they are all using the same collation, then the only other thing odd that I see is

and products_options_name = opa.products_options

which I suspect should be

and po.products_options_name = opa.products_options

 


Always back up before making changes.

Share this post


Link to post
Share on other sites

AH found 1 that was utf8mb_unicode_ci  "products_options_images_enabled" (how I do not know). Thanks.

Share this post


Link to post
Share on other sites

I have made a lot of progress ,it works with discount codes, point and rewards and gift voucher secure.

I do not use taxes so haven't checked it out.  probably  will work with a little tweak.

 

 

 

Edited by hungryfrank

Share this post


Link to post
Share on other sites
On 12/24/2019 at 2:26 PM, BrockleyJohn said:

@ArtcoInc and anyone else using shipping weights:

I can confirm that there still IS a bug with shipping weights - specifically when you add a product that's already in the order, it trashes the calculated order weight (possibly overwriting instead of adding for that product, but definitely making it wrong!)

yes it delete  all the ot values and recalculates everything.

you can grab the value of the weight before it dumps the ot values

Share this post


Link to post
Share on other sites
30 minutes ago, hungryfrank said:

yes it delete  all the ot values and recalculates everything.

you can grab the value of the weight before it dumps the ot values

Sorry that was not the problem at all - it was an issue with the indexing of the products in the cart and nothing to do with the order totals. The cart class in catalog and the original admin version in this addon do not cope with more than one order line for the same product. In the catalog they automatically get combined when you add the same product again.

I updated the cart class in this addon so that it copes with the same product on multiple lines, allowing you to 'get one free', give another half price and other such real life situations that you want to show on the invoice.


For a new install or if your store isn't mobile-friendly, get the community-supported responsive osCommerce (Phoenix).

here: on the official osc download page

Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x

Share this post


Link to post
Share on other sites
2 hours ago, BrockleyJohn said:

Sorry that was not the problem at all - it was an issue with the indexing of the products in the cart and nothing to do with the order totals. The cart class in catalog and the original admin version in this addon do not cope with more than one order line for the same product. In the catalog they automatically get combined when you add the same product again.

I updated the cart class in this addon so that it copes with the same product on multiple lines, allowing you to 'get one free', give another half price and other such real life situations that you want to show on the invoice.

my bad I did not understand 

I made some changes and it pretty much deals with the discount addons and made some changes in the add-on functions. to work with order editor. I just started testing but it seems to work up to  90%.-100 

except the taxes.  I have to work on that but it shouldn't be that hard. 

 

at the beginning of the file I have these  that determines which add-on u are using.

    if (!defined('USE_GV')) define('USE_GV','FALSE');
    if (!defined('USE_POINTS')) define('USE_POINTS','FALSE');
    if (!defined('USE_COUPON')) define('USE_COUPON','FALSE');
    if (!defined('USE_DISCOUNT')) define('USE_DISCOUNT','TRUE');

 

 

 

edit_orders.php

functions.php

Edited by hungryfrank

Share this post


Link to post
Share on other sites

I fixed the taxes also

it works with discount code

it works with giftvoucher secure

it works with pointed rewards

problems

I can not sell a GIFT product

it can not calculate tax reduction based on points used .

calculating the. point for the purchase is not working correctly but it is easily fixable

adding 

if anyone interested I can  put the code here.

Share this post


Link to post
Share on other sites

I uploaded order editor (new files) to my Phoenix site.  V1.0.4.3  The instructions said that was all I needed todo.  But it seems like something is missing.  I do not see order editor on the the admin side.  What did I miss?

 

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

×