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

Edit Orders v4.0 Support Thread

Views: 346,044

Results 941 to 960 of 1,927
13 May 2016, 10:20 PM
#941
wilt avatar

wilt

Oji-san

Join Date:
Jun 2003
Location:
Newcastle UK
Posts:
1,837
Plugin Contributions:
3

Edit Orders v4.0 Support Thread

The problem is this test
if (defined ('PROJECT_VERSION_MAJOR') && version_compare (PROJECT_VERSION_MAJOR . '.' . PROJECT_VERSION_MINOR, '1.5.5', '>=') && class_exists ('AdminRequestSanitizer') && method_exists ('AdminRequestSanitizer', 'getInstance')) {

1.5.5a will fail as version_compare("1.5.5a", "1.5.5") = -1

13 May 2016, 10:22 PM
#942
wilt avatar

wilt

Oji-san

Join Date:
Jun 2003
Location:
Newcastle UK
Posts:
1,837
Plugin Contributions:
3

Re: Edit Orders v4.0 Support Thread

drbyte suggests

(int)(PROJECT_VERSION_MAJOR . '.' . PROJECT_VERSION_MINOR <= '1.5.5');

14 May 2016, 1:28 AM
#944
mc12345678 avatar

mc12345678

Totally Zenned

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

Re: Edit Orders v4.0 Support Thread

wilt:

The problem is this test
if (defined ('PROJECT_VERSION_MAJOR') && version_compare (PROJECT_VERSION_MAJOR . '.' . PROJECT_VERSION_MINOR, '1.5.5', '>=') && class_exists ('AdminRequestSanitizer') && method_exists ('AdminRequestSanitizer', 'getInstance')) {

1.5.5a will fail as version_compare("1.5.5a", "1.5.5") = -1

wilt:

drbyte suggests

(int)(PROJECT_VERSION_MAJOR . '.' . PROJECT_VERSION_MINOR <= '1.5.5');

Considering that this "feature" was considered to be applied to 1.5.5.a and future versions, I would suggest:

if (defined ('PROJECT_VERSION_MAJOR') && (version_compare (PROJECT_VERSION_MAJOR . '.' . PROJECT_VERSION_MINOR, '1.5.5.a', '=') || version_compare (PROJECT_VERSION_MAJOR . '.' . PROJECT_VERSION_MINOR, '1.5.5', '>')) && class_exists ('AdminRequestSanitizer') && method_exists ('AdminRequestSanitizer', 'getInstance')) {
14 May 2016, 3:50 AM
#945
drbyte avatar

drbyte

Sensei

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

Re: Edit Orders v4.0 Support Thread

Strictly speaking, this is enough: class_exists ('AdminRequestSanitizer') && method_exists ('AdminRequestSanitizer', 'getInstance')

14 May 2016, 1:21 PM
#947
lat9 avatar

lat9

Administrator

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

Re: Edit Orders v4.0 Support Thread

DrByte:

Strictly speaking, this is enough: class_exists ('AdminRequestSanitizer') && method_exists ('AdminRequestSanitizer', 'getInstance')
Thanks, DrByte; I'll get that change incorporated.

swguy:

Yes - this logic was intended to be added to all 1.5+ carts.
https://www.zen-cart.com/showthread.php?219732-Trustwave-Security-report-Patch-Included-TWSL2016-006
Arggh, I'd seen that posting but hadn't "looked under the covers". Here's hoping that some store owner doesn't blindly install that patch on a store that uses Edit Orders (and possibly other plugins that don't yet know that they're broken)! Would it be possible to update that posting to provide some modicum of caution, possibly specifically referencing Edit Orders?

14 May 2016, 1:34 PM
#948
lat9 avatar

lat9

Administrator

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

Re: Edit Orders v4.0 Support Thread

I've got the change above incorporated and created a 4.1.5-beta2 distribution as it seems that we're getting closer to having a releasable version!

14 May 2016, 1:35 PM
#949
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,686
Plugin Contributions:
56

Re: Edit Orders v4.0 Support Thread

I think the way to go is just to update and improve the patch (using the fixes that you, wilt and DrByte have provided) so this isn't an issue.

There is another mod somewhere that also breaks Edit Orders when combined with even this updated patch, but I haven't isolated it.

14 May 2016, 1:44 PM
#950
lat9 avatar

lat9

Administrator

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

Re: Edit Orders v4.0 Support Thread

---Quote (Originally by swguy)---
I think the way to go is just to update and improve the patch (using the fixes that you, wilt and DrByte have provided) so this isn't an issue.

There is another mod somewhere that also breaks Edit Orders when combined with even this updated patch, but I haven't isolated it.
---End Quote---
There are a fair number of "order totals" that are actually "shopping-cart and/or customer-session totals" that break Edit Orders (which has access to neither), so that's not new news.

14 May 2016, 2:49 PM
#951
lat9 avatar

lat9

Administrator

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

Re: Edit Orders v4.0 Support Thread

lat9:

I am aware of that - this is different. And when I say "breaks" I mean breaks in the "missing attributes" sense I had reported earlier.

I just pushed a couple of fixes to EO - navigation at the top was wrong and there was a missing bracket in a sanitizer.
@swguy, Why are you editing **my **posts?

I've updated the EO GitHub repository to correct the missing parentheses (it's now at v4.1.5-beta3).

Your "fix" to the navigation is a "change" to the navigation that's been in EO forever, so it's not going to be changed in the EO repository. You're welcome to make that change to your installation.

14 May 2016, 4:59 PM
#952
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,686
Plugin Contributions:
56

Re: Edit Orders v4.0 Support Thread

lat9:

There are a fair number of "order totals" that are actually "shopping-cart and/or customer-session totals" that break Edit Orders (which has access to neither), so that's not new news.

I am aware of that - this is different. And when I say "breaks" I mean breaks in the "missing attributes" sense I had reported earlier.

I just pushed a couple of fixes to EO - navigation at the top was wrong and there was a missing bracket in a sanitizer.

14 May 2016, 5:00 PM
#953
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,686
Plugin Contributions:
56

Re: Edit Orders v4.0 Support Thread

lat9:

@swguy, Why are you editing **my **posts?

Finger trouble. :( Sorry about that - I have no idea what happened but I have restored the original content.

19 May 2016, 3:09 PM
#954
lat9 avatar

lat9

Administrator

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

Re: Edit Orders v4.0 Support Thread

I just uploaded v4.1.5 of Edit Orders to the plugins for review: https://www.zen-cart.com/downloads.php?do=file&id=1513

The following changes are included:

  • BUGFIX: Correct "Unknown column 'p.products_quantity' in 'field list".
  • BUGFIX: Corrections for coupons with category / product restrictions.
  • CHANGE: Account for order-total modules that have been removed.
  • CHANGE: Mimic storefront sort-order for attributes' display.
  • BUGFIX: Correct incorrect tax-calculations after editing an order.
  • BUGFIX: Correct multi-line comments display with \r\n.
  • CHANGE: Include a "Miscellaneous Cost" order-total that's Edit Orders specific.
  • BUGFIX: Correct interaction with stores that use the "Split Tax Lines" configuration.
  • CHANGE: Remove reliance on the built-in currency initialization scripts.
  • CHANGE: Add support for the "admin sanitization" introduced in Zen Cart 1.5.5.

Please note: This distribution includes a core-file change to the admin's /orders.php script, using the Zen Cart 1.5.4 version of the file as the change-basis. If you are installing on Zen Cart 1.5.5 or later, you'll need to merge the five (5) marked EO-related changes into your version of that file.

19 May 2016, 10:24 PM
#955
mikeyg avatar

mikeyg

Totally Zenned

Join Date:
May 2005
Posts:
515
Plugin Contributions:
0

Re: Edit Orders v4.0 Support Thread

I have a strange problem, I could not see anyone else with this issue but I might have missed it in this thread.
I am using ZC 1.5.4 and EO 4.1.4. When I go to edit an order where the product has attributes the order changes from having a size of 0-3months to having a size: please select...

This cannot be edited.

If I go to add a product to the order from the edit product page, I cannot choose the options for the product I just get size: please select...

Have I got a setting wrong or is there a bug.

If I go back to the order without updating the order is as per the order when put on the system. If I update without making any changes then the product option changes to the size: please select. This is set as my display only option for the front of the site.

I have tired to follow the error log and which has confused my as to which table it is using for the product information. I have two tables orders_products_attributes and orders_products_attributes_stock and I am not sure which one is being used when to pull the attributes for the order from.

At one point I was missing the second table and getting an error when placing an order. That now seems to be fixed as I have generated the table but i am now wondering if this is linked to the error I am now getting.

Yes I have stock_by_attributes module as well.

thank you in advance for some advice on how to cure.

19 May 2016, 11:14 PM
#956
mc12345678 avatar

mc12345678

Totally Zenned

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

Re: Edit Orders v4.0 Support Thread

MikeyG:

I have a strange problem, I could not see anyone else with this issue but I might have missed it in this thread.
I am using ZC 1.5.4 and EO 4.1.4. When I go to edit an order where the product has attributes the order changes from having a size of 0-3months to having a size: please select...

This cannot be edited.

If I go to add a product to the order from the edit product page, I cannot choose the options for the product I just get size: please select...

Have I got a setting wrong or is there a bug.

If I go back to the order without updating the order is as per the order when put on the system. If I update without making any changes then the product option changes to the size: please select. This is set as my display only option for the front of the site.

I have tired to follow the error log and which has confused my as to which table it is using for the product information. I have two tables orders_products_attributes and orders_products_attributes_stock and I am not sure which one is being used when to pull the attributes for the order from.

At one point I was missing the second table and getting an error when placing an order. That now seems to be fixed as I have generated the table but i am now wondering if this is linked to the error I am now getting.

Yes I have stock_by_attributes module as well.

thank you in advance for some advice on how to cure.
The second table: orders_products_attributes_stock is not accessed by SBA (yet) but is used to store data with an expectation that in the future it will be used. It should have no effect on EO unless other code has been incorporated to access a similar named table possibly having a different configuration. Otherwise the only change(s) made to the admin orders.php file in SBA are to support pulling the customid which still at this time uses live data rather than the order history data stored in the above referenced table. I therefore would say that the issue is related to something else though there could also be something going on if there are observers that are interacting with default ZC notifiers.

20 May 2016, 11:56 AM
#957
lat9 avatar

lat9

Administrator

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

Re: Edit Orders v4.0 Support Thread

@MikeyG: Have you, by any chance, installed the Trustwave Security Patch on your ZC1.5.4 site?

22 May 2016, 7:42 PM
#958
mikeyg avatar

mikeyg

Totally Zenned

Join Date:
May 2005
Posts:
515
Plugin Contributions:
0

Re: Edit Orders v4.0 Support Thread

Lat9,

Could this cause issues if it has been installed?

22 May 2016, 7:50 PM
#959
mikeyg avatar

mikeyg

Totally Zenned

Join Date:
May 2005
Posts:
515
Plugin Contributions:
0

Re: Edit Orders v4.0 Support Thread

mc12345678

Thanks for the reply, I have been through carefully to see what I might have tried to merge with these files, My mods are Superorders and edit orders, Stock by attributes, and then the tableau template by numinix which seems to incorporate Image handler 4. I have the google merchant feeder as well. No other mods so one of these must be causing the interference with edit orders. The only file in the admin/includes/classes/observers folder is the stock by attributes file. Not full understanding the classes system I am assuming that the problem could lie in any of the class files not just in the observer folder.

23 May 2016, 12:39 PM
#960
lat9 avatar

lat9

Administrator

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

Re: Edit Orders v4.0 Support Thread

MikeyG:

Lat9,

Could this cause issues if it has been installed?
Yes. That's the same admin-level code change, introduced in Zen Cart 1.5.5, that led to the release of EO 4.1.5. That version of EO should be available real-soon-now from the Zen Cart plugins; you can get it now from EO's GitHub repository: https://github.com/lat9/edit_orders/releases/tag/v4.1.5