Jump to content
jhilgeman

NEW! Complete Order Editing Tool!

Recommended Posts

@SCH_001This was discussed in April 2018 in this topic. I uploaded my version then. As I pointed out my version is heavily mofified.

 

Share this post


Link to post
Share on other sites

Long overdue - I have uploaded a new version of the addon to

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

which includes all the fixes posted to the thread through this year. It installs on Phoenix 1.0.7.10 offering full functionality without core modifications. Many of the php notices and warnings have been fixed.

A little adaptation for customer data modules has been applied so that it doesn't throw warnings or offer the fields if you don't have modules like suburb installed but not all are handled (eg. state) - you can extend along the same lines if required.

A future version could use the new modules properly, along with the rationalisation and autoloading of classes but that will involve an extensive redesign that might end up being a different addon altogether.


Contact me for work on updating existing stores - whether to Phoenix or the new osC when it's released.

Looking for a payment or shipping module? Maybe I've already done it.

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

This was an obsolete comment regarding the version 1.2.8. I was writing a comment to  when a note of a new version was posted

 

Edited by vmn

Share this post


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

There are no core code changes required on any Phoenix version since 1.0.4.0

Sorry, I must have missed something.

As to 1.2.9 I think that there is no infoBoxContent style any more in 1.0.7.9.

I think I stick to my version with one core change. Hopefully the core in the future will contain this extra hook.
I also modify the style of the order list and add order language to the edit link.

BTW, I moved the extra hook to the end of this if statement in orders.php before the last break stmt.

if (($oInfo ?? null) instanceof objectInfo) {
    ...
   echo $OSCOM_Hooks->call('orders', 'orderList');
}
        

 

Share this post


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

Sorry, I must have missed something.    

yeah, probably v1.2.8 which is when core changes were no longer required


Contact me for work on updating existing stores - whether to Phoenix or the new osC when it's released.

Looking for a payment or shipping module? Maybe I've already done it.

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:

Long overdue - I have uploaded a new version of the addon to

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

which includes all the fixes posted to the thread through this year. It installs on Phoenix 1.0.7.10 offering full functionality without core modifications. Many of the php notices and warnings have been fixed.

A little adaptation for customer data modules has been applied so that it doesn't throw warnings or offer the fields if you don't have modules like suburb installed but not all are handled (eg. state) - you can extend along the same lines if required.

A future version could use the new modules properly, along with the rationalisation and autoloading of classes but that will involve an extensive redesign that might end up being a different addon altogether.

Hi,

Thanks for keeping updates to this addon.
I have the previous version installed and the calculation does not work well if you use discount codes.
I wonder if the new version includes the changes so that the discount code addon works well: https://apps.oscommerce.com/xkyCQ&discount-codes-phoenix

Thank you!

Share this post


Link to post
Share on other sites
7 hours ago, f.figue said:

Hi,

Thanks for keeping updates to this addon.
I have the previous version installed and the calculation does not work well if you use discount codes.
I wonder if the new version includes the changes so that the discount code addon works well: https://apps.oscommerce.com/xkyCQ&discount-codes-phoenix

Thank you!

I am afraid that I don't know! We did do some bug fixing around shipping calculations and their tax in the spring. This may have had some impact on other order total modules such as discounts, but I didn't investigate the behaviour. If you can try the latest version and report back specifically what doesn't work if it's still wrong, I can have a look for the cause.


Contact me for work on updating existing stores - whether to Phoenix or the new osC when it's released.

Looking for a payment or shipping module? Maybe I've already done it.

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 11/24/2020 at 9:12 AM, BrockleyJohn said:

Long overdue - I have uploaded a new version of the addon to

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

which includes all the fixes posted to the thread through this year. It installs on Phoenix 1.0.7.10 offering full functionality without core modifications. Many of the php notices and warnings have been fixed.

A little adaptation for customer data modules has been applied so that it doesn't throw warnings or offer the fields if you don't have modules like suburb installed but not all are handled (eg. state) - you can extend along the same lines if required.

A future version could use the new modules properly, along with the rationalisation and autoloading of classes but that will involve an extensive redesign that might end up being a different addon altogether.

Hi John,

Thanks for the update.

Just installed and corrected in admin/order_editor/functions.php, line 284 :

    $product_options_query = tep_db_query("select products_options_id from " . TABLE_PRODUCTS_OPTIONS . " where products_options_name = '" . $options_name . "' and language_id = '" . (int)$language_id . "'");


 TO:

    $product_options_query = tep_db_query("select products_options_id from products_options where products_options_name = '" . $options_name . "' and language_id = '" . (int)$language_id . "'");
 

And 298-300:

          $product_options_values_query = tep_db_query("select pov.products_options_values_id from " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov, " . TABLE_PRODUCTS_ATTRIBUTES . " pa where pa.options_id = '" . $options_id . "' and pov.products_options_values_name = '" . $options_value . "' and pov.language_id = '" . (int)$language_id . "' and pov.products_options_values_id = pa.options_values_id and pa.products_id = '" . (int)$products_id . "'");
    } else {
        $product_options_values_query = tep_db_query("select pov.products_options_values_id from " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov, " . TABLE_PRODUCTS_ATTRIBUTES . " pa where pa.options_id = '" . $options_id . "' and pov.products_options_values_name = '" . $options_value . "' and pov.language_id = '" . (int)$language_id . "' and pov.products_options_values_id = pa.options_values_id");
 

TO:

          $product_options_values_query = tep_db_query("select pov.products_options_values_id from products_options_values pov, products_attributes pa where pa.options_id = '" . $options_id . "' and pov.products_options_values_name = '" . $options_value . "' and pov.language_id = '" . (int)$language_id . "' and pov.products_options_values_id = pa.options_values_id and pa.products_id = '" . (int)$products_id . "'");
    } else {
        $product_options_values_query = tep_db_query("select pov.products_options_values_id from products_options_valuespov, products_attributes pa where pa.options_id = '" . $options_id . "' and pov.products_options_values_name = '" . $options_value . "' and pov.language_id = '" . (int)$language_id . "' and pov.products_options_values_id = pa.options_values_id");

Share this post


Link to post
Share on other sites

@BrockleyJohn

In November I did a fresh install to 7.10 and to moved to 7.12.  I'm also under PHP 7.4

I have used the app under Osc 2.3.4 and in joyed it.  I see that this group is trying to get it to run under Phoenix.  I went to the app page and down loaded the latest app on it.  But then was confused on what part to install.  I down loaded the Order Editor v1.2.9 Phoenix 1.0.7.10 under this app.  But there are several sections. That confused me. 

image.png.482a20c4e5908d0d1fabe8de342965d5.png

Not sure what to do. 

This will be a new install.  Is this ready for 7.12?  If it is any help on what I need to do? 

I see in the installation (new) there is 2 1.0.4 v.  and than I see new files.  Just got my self confused. 

Thanks for the help.

Dean

 

Share this post


Link to post
Share on other sites

@artfulweb @BrockleyJohn

 

Installation (NEW) is unclear to me.  I see that CE Phoenix 1.0.4.0 v is for the most part empty.  And that 1.0.5.0v is empty.  So that leaves me with CE Phoenix before 1.0.4.0v and Catalog new files.  Which one do I use?  I'm thanking the 'Catalog new files'.

After uploading the correct file, which edits do I need to do to order.php

Will I still need to apply the changes to admin/order_editor/functions.php,  that B mentioned above? 

Thanks for any help.

Dean

Share this post


Link to post
Share on other sites
On 11/24/2020 at 5:27 PM, BrockleyJohn said:

I am afraid that I don't know! We did do some bug fixing around shipping calculations and their tax in the spring

Hi, I don't think the discount issue has been reported previously so I doubt its been addressed but I'm in a similar situation. It doesn't handle discounts and the totals go out when any changes are made.

If a product, for example, is changed it recalculates the order totals. BUT

1) The new TAX is calculated ignoring the discount.

2) The new order total uses this Tax amount but also ignores the discount line.

Where in the code  does it re-calculate the totals? Couldn't find it.

Share this post


Link to post
Share on other sites

Apologies to the discounters - I've been completely snowed under. It's going to need some investigation - I rewrote the classes it uses as extensions of the catalog ones last year, so I would hope that they would behave the same. The totals are calculated with the call to order_totals->process - if the tax is coming out wrongly the modules may be being processed in the wrong order.

In the meantime I have added artfulweb's bug fix into the addons area

or folks can just apply the attached admin/includes/order_editor/functions.php

functions.php


Contact me for work on updating existing stores - whether to Phoenix or the new osC when it's released.

Looking for a payment or shipping module? Maybe I've already done it.

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


Thank you for updating  order editor module.. I think it not update yet  1.0.7.18.
I just install it on 1.0.7.18 and  the edit order page not working its give HTTP ERROR 500 

PHP Warning:  require(includes/classes/currencies.php): failed to open stream: No such file or directory in /home/test/public_html/shop/admin/edit_orders.php on line 153

deleting the line from the edit_order.php and from edit_orders_add_product.php will fix the issue

require(DIR_WS_CLASSES . 'currencies.php');

 

and there is still the old tep_get_uprid  function still used in admin/order_editor/cart.php , admin/order_editor/order.php

PHP Deprecated:  The tep_get_uprid function has been deprecated. in /home/test/public_html/shop/admin/includes/functions/general.php on line 362

 

  and there is an error 

PHP Notice:  Undefined index: shipping_same_as_billing in /home/test/public_html/shop/admin/order_editor/css.php on line 180
PHP Notice:  Undefined index: shipping_same_as_billing in /home/test/public_html/shop/admin/order_editor/css.php on line 181
PHP Notice:  Undefined index: billing_same_as_customer in /home/test/public_html/shop/admin/order_editor/css.php on line 183
PHP Notice:  Undefined index: billing_same_as_customer in /home/test/public_html/shop/admin/order_editor/css.php on line 184

 and the lines from 180-187

#shippingAddressEntry { visibility: <?php echo (($_SESSION['shipping_same_as_billing'] == 'on') ? 'hidden' : 'visible') ?>; display: 
<?php echo (($_SESSION['shipping_same_as_billing'] == 'on') ? 'none' : 'table-row') ?>; }

#billingAddressEntry { visibility: <?php echo (($_SESSION['billing_same_as_customer'] == 'on') ? 'hidden' : 'visible') ?>; display: 
<?php echo (($_SESSION['billing_same_as_customer'] == 'on') ? 'none' : 'table-row') ?>; }


--></style>

and PHP Warning

PHP Warning:  Use of undefined constant ICON_SUCCESS - assumed 'ICON_SUCCESS' (this will throw an Error in a future version of PHP) in /home/test/public_html/shop/admin/order_editor/javascript.php on line 34
PHP Warning:  Use of undefined constant ICON_SUCCESS - assumed 'ICON_SUCCESS' (this will throw an Error in a future version of PHP) in /home/test/public_html/shop/admin/order_editor/javascript.php on line 44
PHP Warning:  Use of undefined constant ICON_SUCCESS - assumed 'ICON_SUCCESS' (this will throw an Error in a future version of PHP) in /home/test/public_html/shop/admin/order_editor/javascript.php on line 54
PHP Warning:  Use of undefined constant ICON_TICK - assumed 'ICON_TICK' (this will throw an Error in a future version of PHP) in /home/test/public_html/shop/admin/edit_orders.php on line 1996

 

I think this lines need to be delete from edit_order.php  

    <td width="100%" valign="top">
    <table border="0" width="100%" cellspacing="1" cellpadding="1" class="columnLeft">
    </table>
    </td>


Thank you!
Omar


Get the latest Responsive osCommerce CE (community edition) here .

Share this post


Link to post
Share on other sites

There is more, but I don't know how to fix them:

[07-Mar-2021 17:03:28 America/New_York] PHP Notice:  Constant PAGE_PARSE_START_TIME already defined in /home/store/public_html/admin/includes/application_top.php on line 14

[07-Mar-2021 17:03:28 America/New_York] PHP Notice:  Constant HTTP_SERVER already defined in /home/store/public_html/admin/includes/configure.php on line 5

[07-Mar-2021 17:03:28 America/New_York] PHP Notice:  Constant COOKIE_OPTIONS already defined in /home/store/public_html/admin/includes/configure.php on line 6

[07-Mar-2021 17:03:28 America/New_York] PHP Notice:  Constant DIR_WS_ADMIN already defined in /home/store/public_html/admin/includes/configure.php on line 12

[07-Mar-2021 17:03:28 America/New_York] PHP Notice:  Constant DIR_FS_DOCUMENT_ROOT already defined in /home/store/public_html/admin/includes/configure.php on line 14

[07-Mar-2021 17:03:28 America/New_York] PHP Notice:  Constant DIR_FS_ADMIN already defined in /home/store/public_html/admin/includes/configure.php on line 15

[07-Mar-2021 17:03:28 America/New_York] PHP Notice:  Constant DIR_FS_BACKUP already defined in /home/store/public_html/admin/includes/configure.php on line 16

[07-Mar-2021 17:03:28 America/New_York] PHP Notice:  Constant HTTP_CATALOG_SERVER already defined in /home/store/public_html/admin/includes/configure.php on line 18

[07-Mar-2021 17:03:28 America/New_York] PHP Notice:  Constant DIR_WS_CATALOG already defined in /home/store/public_html/admin/includes/configure.php on line 19

[07-Mar-2021 17:03:28 America/New_York] PHP Notice:  Constant DIR_FS_CATALOG already defined in /home/store/public_html/admin/includes/configure.php on line 20

[07-Mar-2021 17:03:28 America/New_York] PHP Notice:  Constant DB_SERVER already defined in /home/store/public_html/admin/includes/configure.php on line 26

[07-Mar-2021 17:03:28 America/New_York] PHP Notice:  Constant DB_SERVER_USERNAME already defined in /home/store/public_html/admin/includes/configure.php on line 27

[07-Mar-2021 17:03:28 America/New_York] PHP Notice:  Constant DB_SERVER_PASSWORD already defined in /home/store/public_html/admin/includes/configure.php on line 28

[07-Mar-2021 17:03:28 America/New_York] PHP Notice:  Constant DB_DATABASE already defined in /home/store/public_html/admin/includes/configure.php on line 29

[07-Mar-2021 17:03:28 America/New_York] PHP Fatal error:  Cannot redeclare tep_find_all_files_under() (previously declared in /home/store/public_html/includes/functions/autoloader.php:13) in /home/store/public_html/includes/functions/autoloader.php on line 13

Thanks,

P

Share this post


Link to post
Share on other sites

@plamastus it looks like yours has application_top included twice

 


Contact me for work on updating existing stores - whether to Phoenix or the new osC when it's released.

Looking for a payment or shipping module? Maybe I've already done it.

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

Copied everything from "catalog new files", the Edit button shows up but when I click the edit button its open a new tab but the page isn't working. Please help.

I'm using CE Phoenix v1.0.7.14

Share this post


Link to post
Share on other sites
On 3/7/2021 at 11:16 PM, Omar_one said:

@BrockleyJohn


Thank you for updating  order editor module.. I think it not update yet  1.0.7.18.
I just install it on 1.0.7.18 and  the edit order page not working its give HTTP ERROR 500 


PHP Warning:  require(includes/classes/currencies.php): failed to open stream: No such file or directory in /home/test/public_html/shop/admin/edit_orders.php on line 153

deleting the line from the edit_order.php and from edit_orders_add_product.php will fix the issue


require(DIR_WS_CLASSES . 'currencies.php');

 

and there is still the old tep_get_uprid  function still used in admin/order_editor/cart.php , admin/order_editor/order.php


PHP Deprecated:  The tep_get_uprid function has been deprecated. in /home/test/public_html/shop/admin/includes/functions/general.php on line 362

 

  and there is an error 


PHP Notice:  Undefined index: shipping_same_as_billing in /home/test/public_html/shop/admin/order_editor/css.php on line 180
PHP Notice:  Undefined index: shipping_same_as_billing in /home/test/public_html/shop/admin/order_editor/css.php on line 181
PHP Notice:  Undefined index: billing_same_as_customer in /home/test/public_html/shop/admin/order_editor/css.php on line 183
PHP Notice:  Undefined index: billing_same_as_customer in /home/test/public_html/shop/admin/order_editor/css.php on line 184

 and the lines from 180-187


#shippingAddressEntry { visibility: <?php echo (($_SESSION['shipping_same_as_billing'] == 'on') ? 'hidden' : 'visible') ?>; display: 
<?php echo (($_SESSION['shipping_same_as_billing'] == 'on') ? 'none' : 'table-row') ?>; }

#billingAddressEntry { visibility: <?php echo (($_SESSION['billing_same_as_customer'] == 'on') ? 'hidden' : 'visible') ?>; display: 
<?php echo (($_SESSION['billing_same_as_customer'] == 'on') ? 'none' : 'table-row') ?>; }


--></style>

and PHP Warning


PHP Warning:  Use of undefined constant ICON_SUCCESS - assumed 'ICON_SUCCESS' (this will throw an Error in a future version of PHP) in /home/test/public_html/shop/admin/order_editor/javascript.php on line 34
PHP Warning:  Use of undefined constant ICON_SUCCESS - assumed 'ICON_SUCCESS' (this will throw an Error in a future version of PHP) in /home/test/public_html/shop/admin/order_editor/javascript.php on line 44
PHP Warning:  Use of undefined constant ICON_SUCCESS - assumed 'ICON_SUCCESS' (this will throw an Error in a future version of PHP) in /home/test/public_html/shop/admin/order_editor/javascript.php on line 54
PHP Warning:  Use of undefined constant ICON_TICK - assumed 'ICON_TICK' (this will throw an Error in a future version of PHP) in /home/test/public_html/shop/admin/edit_orders.php on line 1996

 

I think this lines need to be delete from edit_order.php  


    <td width="100%" valign="top">
    <table border="0" width="100%" cellspacing="1" cellpadding="1" class="columnLeft">
    </table>
    </td>


Thank you!
Omar

any plan to update it to  1.0.7.18. or any fix  
Thank you!
Omar


Get the latest Responsive osCommerce CE (community edition) here .

Share this post


Link to post
Share on other sites

@Omar_one

Yes, I do intend to update asap (plan would be putting it a bit strongly 🙂

I have just had to send my dev machine off under warranty as it's making a horrible grinding noise so have just lost a week's productivity and am wading through a backlog of communications and trying to claw back progress on jobs.

I'll be aiming for 1.0.8.0 but the chances are it should work on 7.18 too

In the short term you can suppress notices and deprecated.

@bigplusmart I think I've had it working on  7.14 but can't swear to it. Assuming you've a white page, turn on display errors and report back exactly what the issue is:

ini_set('display_errors', 1);

in admin/includes/application_top.php


Contact me for work on updating existing stores - whether to Phoenix or the new osC when it's released.

Looking for a payment or shipping module? Maybe I've already done it.

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
Posted (edited)
10 minutes ago, BrockleyJohn said:

@Omar_one

Yes, I do intend to update asap (plan would be putting it a bit strongly 🙂

I have just had to send my dev machine off under warranty as it's making a horrible grinding noise so have just lost a week's productivity and am wading through a backlog of communications and trying to claw back progress on jobs.

I'll be aiming for 1.0.8.0 but the chances are it should work on 7.18 too

In the short term you can suppress notices and deprecated.

@bigplusmart I think I've had it working on  7.14 but can't swear to it. Assuming you've a white page, turn on display errors and report back exactly what the issue is:


ini_set('display_errors', 1);

in admin/includes/application_top.php

Thank you,
it was 1.0.8.0  sorry i

Edited by Omar_one

Get the latest Responsive osCommerce CE (community edition) here .

Share this post


Link to post
Share on other sites
Posted (edited)
On 3/11/2021 at 1:58 AM, BrockleyJohn said:

@Omar_one

Yes, I do intend to update asap (plan would be putting it a bit strongly 🙂

I have just had to send my dev machine off under warranty as it's making a horrible grinding noise so have just lost a week's productivity and am wading through a backlog of communications and trying to claw back progress on jobs.

I'll be aiming for 1.0.8.0 but the chances are it should work on 7.18 too

In the short term you can suppress notices and deprecated.

@bigplusmart I think I've had it working on  7.14 but can't swear to it. Assuming you've a white page, turn on display errors and report back exactly what the issue is:


ini_set('display_errors', 1);

in admin/includes/application_top.php

This is the error, please check. Thank you.

 

Capture.JPG

Edited by bigplusmart
had to hide directory structure (attached photo)

Share this post


Link to post
Share on other sites
7 hours ago, bigplusmart said:

This is the error, please check. Thank you.

 

Capture.JPG

@bigplusmart

This is the error for which Omar posted a fix on Sunday; the workaround is comment out line 153 (put // at the beginning)


Contact me for work on updating existing stores - whether to Phoenix or the new osC when it's released.

Looking for a payment or shipping module? Maybe I've already done it.

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

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

×