Zen Cart Logo
Forums / Addon Admin Tools / Edit Orders v4.0 Support Thread

Edit Orders v4.0 Support Thread

Views: 346,042

Results 821 to 840 of 1,927
26 Dec 2015, 10:39 PM
#821
marton_1 avatar

marton_1

Totally Zenned

Join Date:
Apr 2013
Location:
eglisau switzerland
Posts:
568
Plugin Contributions:
0

Edit Orders v4.0 Support Thread

It is really a pain.
The edit order function stopped working because there were some files missing. Now it looks like other files are missing.
I never did any kind of restore which could have damaged file although restore does not actually delete files. It is not so easy to delete files in my shop; I mean I have to go in with ftp and delete one by one...
Surely I would have noticed :(

27 Dec 2015, 1:27 AM
#822
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Edit Orders v4.0 Support Thread

marton_1:

It is really a pain.
The edit order function stopped working because there were some files missing. Now it looks like other files are missing.
I never did any kind of restore which could have damaged file although restore does not actually delete files. It is not so easy to delete files in my shop; I mean I have to go in with ftp and delete one by one...
Surely I would have noticed :(

That is if you in fact are the only one that gained access (suggest reviewing for/recovering from potential hack attempts). Correct, random files should not go missing, though it is possible that on upload of one thing or another errors can be introduced. It truly depends on how things have come to be the way they are now and why the posting tips are always a good place to start with information.

28 Dec 2015, 7:59 AM
#823
lhungil avatar

lhungil

Totally Zenned

Join Date:
Feb 2012
Location:
mostly harmless
Posts:
1,818
Plugin Contributions:
4

Re: Edit Orders v4.0 Support Thread

marton_1:

I have v1.5.1 with the classic template

I installed edit-order about a year ago and it worked fine.

I wanted to change an order today but the "edit" button is not showing up? ...
Sounds like files in the Zen Cart administrative folder were changed. Has anyone made ANY changes to the site?

Most of the time when something "mysteriously changes", the root cause is someone made changes to the site (restored from a backup, installed something new, edited files, removed something, attempted an upgrade, hosting provider changed the version of PHP, etc).

Best case scenario, the changes were made by an authorized party (done by you, someone you hired, or the hosting provider). Worst case scenario, the changes were caused by someone compromising the server hosting your website. Either way it would be a good idea to compare your site against a known good backup (and against the stock Zen Cart installation) as recommended by mc12345678 to verify no other "mysterious changes" exist.

marton_1:

I uploaded the edit-order files with ftp and now I have the "edit" button again ...
Glad you were able to simply re-install Edit Orders to restore the functionality. When (re-)installing Edit Orders if one overwrites files, one will need to apply all applicable bug fixes posted since the (re-)installed version of Edit Orders was released. It has been awhile since the current stable version of Edit Orders (4.1.4) was released, so some of the posted Bug Fixes may be a number of pages back in this thread.

It sounds like a fellow forum member has kindly re-posted one of the fixes applicable to your store environment (based upon the error logs).

marton_1:

... ```
[26-Dec-2015 23:17:06 Europe/Berlin] PHP Fatal error: Call to undefined function zen_product_in_category() in C:\xampp\htdocs\zencart151--admin---\includes\functions\extra_functions\edit_orders_functions.php on line 326

Based on this error, you will need to apply the bugfix for [Coupons with Category / Product Restrictions](https://www.zen-cart.com/showthread.php?200407-Edit-Orders-v4-0-Support-Thread&p=1242779#post1242779).
29 Dec 2015, 8:20 PM
#824
marton_1 avatar

marton_1

Totally Zenned

Join Date:
Apr 2013
Location:
eglisau switzerland
Posts:
568
Plugin Contributions:
0

Re: Edit Orders v4.0 Support Thread

@ mc12345678 @ lhungil

Thank you for your help gentlemen.
This has given me the push to upgrade to a nice clean installation of 1.5.4. I suspect there is a lot of false or dodgy stuff in my web shop as I learned and modified over the years.

I have installed a V1.5.4 test system on my PC and edit-orders works fine on that so I believe that will be my best solution?

30 Dec 2015, 12:24 PM
#825
marton_1 avatar

marton_1

Totally Zenned

Join Date:
Apr 2013
Location:
eglisau switzerland
Posts:
568
Plugin Contributions:
0

Re: Edit Orders v4.0 Support Thread

marton_1:

@ mc12345678 @ lhungil

Thank you for your help gentlemen.
This has given me the push to upgrade to a nice clean installation of 1.5.4. I suspect there is a lot of false or dodgy stuff in my web shop as I learned and modified over the years.

I have installed a V1.5.4 test system on my PC and edit-orders works fine on that so I believe that will be my best solution?

Just read the announcement about the new version 1.5.5, ho hum, maybe I will wait a month...

30 Dec 2015, 7:06 PM
#826
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Edit Orders v4.0 Support Thread

marton_1:

Just read the announcement about the new version 1.5.5, ho hum, maybe I will wait a month...

If I may suggest this, since you seem to be contemplating when to do the upgrade, to install a temporary version of the current ZC 1.5.5 beta to at least see that it works on your particular configuration as is... If there are issues, report them to the applicable FEEDBACK ON BETA of ZC 155 thread. This will also tell you what changes you might need to make to support ZC 1.5.5. Appears that you have ZC 1.5.4 working as a temporary site, which is good news, so hopefully not much is needed for ZC 1.5.5 from there.

And yes I know this is a bit of a dig/sarcasm: Looks like have waited nearly four years already what's another month? :P

30 Dec 2015, 7:53 PM
#827
marton_1 avatar

marton_1

Totally Zenned

Join Date:
Apr 2013
Location:
eglisau switzerland
Posts:
568
Plugin Contributions:
0

Re: Edit Orders v4.0 Support Thread

mc12345678:

If I may suggest this, since you seem to be contemplating when to do the upgrade, to install a temporary version of the current ZC 1.5.5 beta to at least see that it works on your particular configuration as is... If there are issues, report them to the applicable FEEDBACK ON BETA of ZC 155 thread. This will also tell you what changes you might need to make to support ZC 1.5.5. Appears that you have ZC 1.5.4 working as a temporary site, which is good news, so hopefully not much is needed for ZC 1.5.5 from there.

And yes I know this is a bit of a dig/sarcasm: Looks like have waited nearly four years already what's another month? :P

Good idea :cheers: :rolleyes:

18 Jan 2016, 8:20 PM
#828
aestheticdesign avatar

aestheticdesign

New Zenner

Join Date:
Aug 2011
Posts:
29
Plugin Contributions:
0

Re: Edit Orders v4.0 Support Thread

Currently running ZC 1.5.4 with a custom theme. After upgrading to 1.5.4 I moved from the older Edit Orders to the newer, 4.0 version, installing the latest version available, 4.1.4. I have a couple of problems with the new version:

  1. Unzipping the Zip file, the files aren't organized properly to enable the instruction HTML files to work properly. For example, the main HTML page is named readme/index.html rather than there being a readme directory, with the index.html file inside of it. I was able to rename and organize everything so it works, but it's a major stumbling block to getting it installed. I unzipped it on a Mac running Mavericks if that makes any difference. I initially did the install around 7/2015, but I just downloaded another fresh copy and after unzipping it, I have the same problem.

  2. There seems to be a behavior difference between the older version and the version 4 module and I'm not sure if it's intentional or not. In the old version, in the order total area there would be a blank line where you could enter a text description and an amount and it would adjust the total and give you another blank line. This seems to have disappeared in the 4.0 version. I've tried the installation on a generic install of 1.5.4 with the default template and didn't see a way to adjust the total there either. The description of the program says that feature is still there so could someone post a screen shot of what it is supposed to look like?

18 Jan 2016, 9:06 PM
#829
aestheticdesign avatar

aestheticdesign

New Zenner

Join Date:
Aug 2011
Posts:
29
Plugin Contributions:
0

Re: Edit Orders v4.0 Support Thread

Here is a screen shot of what Edit Orders 4.1.4 looks like on my fresh install of 1.5.4. It doesn't look at all like the screen shot shown in the readme files.

http://www.ferndale-ca.com/editorders.png

20 Jan 2016, 11:36 PM
#830
lhungil avatar

lhungil

Totally Zenned

Join Date:
Feb 2012
Location:
mostly harmless
Posts:
1,818
Plugin Contributions:
4

Re: Edit Orders v4.0 Support Thread

aestheticdesign:

... Unzipping the Zip file, the files aren't organized properly to enable the instruction HTML files to work properly. ...
Some users have reported issues unpacking the zip archive (in particular the readme folder) using some compression tools. If you are encountering difficulties, please try unpacking with different software.

It would be useful to future readers if you can post exactly which software is failing to extract the contents of the archive.

Users have reported the zip archive for Edit Orders 4.1.4 can be successfully extracted using: 7zip, WinZIP, Rar, PHP's ZipArchive class, and the built-in Windows 7/8/10 compression tools.

aestheticdesign:

... There seems to be a behavior difference between the older version ...
aestheticdesign:

... It doesn't look at all like the screen shot shown in the readme files. ...
Hopefully you are able to use different compression software on your computer to extract the contents of the zip archive. The included readme is a valuable read, including more detailed instructions on "How to Use" Edit Orders 4.1+.

Yes the behavior of Edit Orders 4.1+ is different from Edit Orders 4.0.x and older. This could be a bit of a surprise if the compression tool one used was unable to extract the readme. The biggest difference IMO in the new version was changes to make the "Admin Edit" process more closely match the "Customer Checkout" process. There are a number of reasons and most have been discussed earlier in this support thread.

In addition to providing more detailed instructions on using the new version of Edit Orders, the "How to Use" section of the included readme contains updated images showing the different parts of the Edit Orders admin pages. These almost exactly match the image you posted.

28 Jan 2016, 2:33 PM
#831
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,955
Plugin Contributions:
8

Re: Edit Orders v4.0 Support Thread

bug in the code. lines 1025-1028 in the function eo_remove_product_from_order. i have shown my correction (although there are other possibilities):

// original code
				$check = $db->Execute(
					'SELECT `p`.`products_quantity` FROM `' . TABLE_PRODUCTS . '` ' .
				 	'WHERE `p`.`products_id` = \'' . (int)$query->fields['products_id'] . '\''
				);

// correction

				$check = $db->Execute(
					'SELECT `p`.`products_quantity` FROM `' . TABLE_PRODUCTS . '` p ' .
				 	'WHERE `p`.`products_id` = \'' . (int)$query->fields['products_id'] . '\''
				);

best.

28 Jan 2016, 10:35 PM
#833
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,066
Plugin Contributions:
56

Re: Edit Orders v4.0 Support Thread

This one, on the other hand, just cropped up recently on a client's site when he was editing an order with a restricted coupon:

PHP Fatal error:  Call to undefined function zen_product_in_category() in /home/mysite/public_html/admin/includes/functions/extra_functions/edit_orders_functions.php on line 326

The line number's most likely not going to match because I've kept this site up-to-date with the EO bug-fixes as they're reported. To correct the issue, I edited /admin/includes/functions/extra_functions/edit_orders_functions.php, conditionally adding the function defined in the store-front's /includes/functions/functions_categories.php as highlighted below:

[B]//-bof-20160128-lat9-Forum bugfix
if (!function_exists ('zen_product_in_category')) {
  function zen_product_in_category($product_id, $cat_id) {
    global $db;
    $in_cat=false;
    $category_query_raw = "select categories_id from " . TABLE_PRODUCTS_TO_CATEGORIES . "
                           where products_id = '" . (int)$product_id . "'";

    $category = $db->Execute($category_query_raw);

    while (!$category->EOF) {
      if ($category->fields['categories_id'] == $cat_id) $in_cat = true;
      if (!$in_cat) {
        $parent_categories_query = "select parent_id from " . TABLE_CATEGORIES . "
                                    where categories_id = '" . $category->fields['categories_id'] . "'";

        $parent_categories = $db->Execute($parent_categories_query);
//echo 'cat='.$category->fields['categories_id'].'#'. $cat_id;

        while (!$parent_categories->EOF) {
          if (($parent_categories->fields['parent_id'] !=0) ) {
            if (!$in_cat) $in_cat = zen_product_in_parent_category($product_id, $cat_id, $parent_categories->fields['parent_id']);
          }
          $parent_categories->MoveNext();
        }
      }
      $category->MoveNext();
    }
    return $in_cat;
  }
}
//-eof-20160128-lat9
[/B]
// Start Edit Orders configuration functions
function eo_debug_action_level_list($level) {
	global $template;
28 Jan 2016, 11:39 PM
#834
lhungil avatar

lhungil

Totally Zenned

Join Date:
Feb 2012
Location:
mostly harmless
Posts:
1,818
Plugin Contributions:
4

Re: Edit Orders v4.0 Support Thread

lat9:

This one, on the other hand, just cropped up recently on a client's site when he was editing an order with a restricted coupon ...
Good Eye, should be applied along with the patches here. May also have to include zen_product_in_parent_category from "/includes/functions/functions_categories.php".

29 Jan 2016, 2:33 PM
#835
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,066
Plugin Contributions:
56

Re: Edit Orders v4.0 Support Thread

lhungil:

Good Eye, should be applied along with the patches here. May also have to include zen_product_in_parent_category from "/includes/functions/functions_categories.php".
Good eye back at you, lhungil. I totally missed that one.

30 Jan 2016, 12:02 AM
#836
jmsnyder23 avatar

jmsnyder23

Zen Follower

Join Date:
Jan 2010
Location:
Richmond, Virginia, United States
Posts:
122
Plugin Contributions:
0

Re: Edit Orders v4.0 Support Thread

I'm using the mod Big Chooser by That Software Guy and can't get it to work with this mod. When I upload the orders.php file that comes with this mod, I get the same warning everyone else does about the shipping address (because 99.9% of my products are virtual), so I would like to have that removed. But when I click update, I get a 500 server error. Checking my logs, this is the error I get:

[29-Jan-2016 18:51:21 America/New_York] PHP Warning: array_key_exists() expects parameter 2 to be array, boolean given in /includes/functions/extra_functions/edit_orders_functions.php on line 1409

[29-Jan-2016 18:51:21 America/New_York] PHP Warning: array_key_exists() expects parameter 2 to be array, boolean given in /includes/functions/extra_functions/edit_orders_functions.php on line 1409

[29-Jan-2016 18:51:21 America/New_York] PHP Fatal error: Call to undefined function zen_get_products_manufacturers_id() in /includes/modules/order_total/ot_big_chooser.php on line 942

30 Jan 2016, 2:46 PM
#837
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,955
Plugin Contributions:
8

Re: Edit Orders v4.0 Support Thread

lat9:

Yes, that one's been around for a while now: https://www.zen-cart.com/showthread.php?200407-Edit-Orders-v4-0-Support-Thread&p=1235066#post1235066

sorry. did not see it....

on another note, i am hopeful that in future releases, the admin of ZC makes use of the customer facing functions and then starts extending/adding as opposed to re-creating and having the ame code in 2 places... although some times the functions are slightly different which in my mind only makes matters worse.

best.

30 Jan 2016, 3:01 PM
#838
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,066
Plugin Contributions:
56

Re: Edit Orders v4.0 Support Thread

carlwhat:

sorry. did not see it....

on another note, i am hopeful that in future releases, the admin of ZC makes use of the customer facing functions and then starts extending/adding as opposed to re-creating and having the ame code in 2 places... although some times the functions are slightly different which in my mind only makes matters worse.

best.
<off-topic>
Agreed on the combined use of functions on the admin/store-front! It's got to be a pain to the developers, too, since they need to maintain two versions of most of the functions.
</off-topic>

30 Jan 2016, 4:25 PM
#839
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Edit Orders v4.0 Support Thread

lat9:

<off-topic>
Agreed on the combined use of functions on the admin/store-front!

It's got to be a pain to the developers, too, since they need to maintain two versions of most of the functions.
</off-topic>
Yup. There's been some work in the upcoming v1.6.0 to consolidate some of the duplication. It's not perfect, but it's progressively improving over time.

7 Feb 2016, 8:00 PM
#840
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,066
Plugin Contributions:
56

Re: Edit Orders v4.0 Support Thread

Apologies if this has been previously reported, but if Edit Orders is used to add a multi-line comment, the comments are "over-prepared" as described in this (https://www.zen-cart.com/showthread.php?219484-Unwanted-characters-showing-up-in-Comments-section-of-Admin-Orders&p=1303394#post1303394) posting, i.e. the comments display as

line 1\r\nline2\r\n

instead of

line 1
line 2

That posting also contains the corrective action.