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

Edit Orders v4.0 Support Thread

Views: 346,043

Results 921 to 940 of 1,927
28 Apr 2016, 1:29 AM
#921
jeking avatar

jeking

Totally Zenned

Join Date:
Oct 2005
Location:
Chicago, IL USA
Posts:
1,592
Plugin Contributions:
0

Edit Orders v4.0 Support Thread

kcallagmy:

Is it easy to go back to 1.5.4 from 1.5.5 ?

If you kept a backup before you upgraded, sure ... and if you don't mind losing any database records added since that backup, too.

3 May 2016, 5:55 PM
#922
athena avatar

athena

Totally Zenned

Join Date:
Jan 2006
Location:
NM
Posts:
740
Plugin Contributions:
0

Re: Edit Orders v4.0 Support Thread

Thanks for this mod.. we use it a lot.

Doing a fresh install of 1.5.4 for testing and am currently working on merging Edit Orders and Ty Tracker with admin/orders.php.

I can see where Ty Tracker has pretty clearly stated the BOF and EOF edits, but I can not make out the merging of the admin/orders.php file with EO.

So... FORGETTING Ty Tracker... and starting over and just working with the original admin/orders.php out of the box, still can not make sense of the merging of EO into orders.php. Compared it to our current 1.5.1 and must have been a genius back then, or miracle worker because it works for our 1.5.1 shop.

1st Question: Is blind faith an option with the 1.5.4 admin/orders.php where EO is concerned? Just drop it in?

2nd Question: Would anyone have a merged EO admin/orders.php from zen1.5.4 with Ty Tracker that works that I could see?

SBA is next... Omg...

3 May 2016, 6:15 PM
#923
lat9 avatar

lat9

Administrator

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

Re: Edit Orders v4.0 Support Thread

The version of EO that is currently residing on GitHub (https://github.com/lat9/edit_orders/) has been pre-merged with the Zen Cart v1.5.4 orders.php (and I'm pretty sure that the TyPT changes are also included).

That version also has some changes for Zen Cart 1.5.5 and is waiting for the ZC 1.5.5a release for compatibility testing prior to its release as EO 4.1.4a.

3 May 2016, 8:12 PM
#924
athena avatar

athena

Totally Zenned

Join Date:
Jan 2006
Location:
NM
Posts:
740
Plugin Contributions:
0

Re: Edit Orders v4.0 Support Thread

Thanks... i was on my way there for SBA... cool...

8 May 2016, 11:43 PM
#925
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 could swear the new sanitizers in 155a + latest Github EO are not playing well. Am I crazy?

9 May 2016, 11:56 AM
#926
lat9 avatar

lat9

Administrator

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

Re: Edit Orders v4.0 Support Thread

swguy:

I could swear the new sanitizers in 155a + latest Github EO are not playing well. Am I crazy?
A little more information would certainly help; how are they not playing well?

9 May 2016, 1:27 PM
#927
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'll do an install on a clean system shortly and report back. Wasn't sure if anyone else had tried it and had bad results so I wanted to check first.

Update later: Dup'ed; see post below.

12 May 2016, 2:38 PM
#928
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

Does it make sense to pull the latest from https://github.com/lat9/edit_orders and call that the 1.5.4 version so we can get on with updating for 1.5.5? (last update to this plugin was 01/14 for 1.5.3.)

13 May 2016, 10:59 AM
#929
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

OK, I can repro the issue. What's happening is that on the 4th step (Add Now), on the default database with test products, I get correct attributes and options:

<input type='submit' value='Add now'><input type="hidden" name="id[3][value]" value="8"><input type="hidden" name="id[3][type]" value="0">

but on my database, these fields have been damaged:

<input type='submit' value='Add now'><input type="hidden" name="id[26]" value="Array"><input type="hidden" name="id[27]" value="Array">

(which creates empty values in orders_products_attributes.

So going back a step, on the default database in step 3, I get

<label class="attribsSelect" for="attrib-3">Model</label><select rel="dropdown" name="id[3][value]" id="attrib-3">

and on my database, I get

<label class="attribsSelect" for="attrib-27">Mounting Orientation:</label><select rel="dropdown" name="id[27][value]" id="attrib-27">

which looks the same to me.

Gets into init_sanitize fine, but goes from ./includes/classes/AdminRequestSanitizer.php into filterSimpleAlphanumPlus which clobbers the array (line 335).

It looks like on my side, the ParameterDefinitions array does not include the entry for MULTI_DIMENSIONAL.

13 May 2016, 12:00 PM
#930
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

One thing that looks interesting - why does admin/includes/extra_datafiles/eo_sanitization.php add an array entry for "update_products"
but not for add_prdct ? (I tried that and it didn't fix my issue but it's still curious.)

13 May 2016, 12:12 PM
#931
lat9 avatar

lat9

Administrator

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

Re: Edit Orders v4.0 Support Thread

@swguy, you say you're using the demo products, but there's no option named "Mounting Options". If you could identify the specifics of the product and its attributes that you're trying to add to the order, I could probably help.

I'm also not sure what you mean by:

It looks like on my side, the ParameterDefinitions array does not include the entry for MULTI_DIMENSIONAL.

... although, in reviewing the sanitization array (in /ADMIN/includes/extra_datafiles/eo_sanitization.php) there's an entry for the update_order path, but not one for the add_prdct one.

13 May 2016, 12:22 PM
#932
lat9 avatar

lat9

Administrator

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

Re: Edit Orders v4.0 Support Thread

OK, got one. Tried to add the "Big Linked" version of "A Bug's Life ..." entered all the attributes, clicked "Add" and came back to the same screen (with debug-logs generated). At this point, I've got something to work with and will report back when I've got a solution.

13 May 2016, 12:30 PM
#933
mc12345678 avatar

mc12345678

Totally Zenned

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

Re: Edit Orders v4.0 Support Thread

swguy:

OK, I can repro the issue. What's happening is that on the 4th step (Add Now), on the default database with test products, I get correct attributes and options:

<input type='submit' value='Add now'><input type="hidden" name="id[3][value]" value="8"><input type="hidden" name="id[3][type]" value="0">

but on my database, these fields have been damaged:

<input type='submit' value='Add now'><input type="hidden" name="id[26]" value="Array"><input type="hidden" name="id[27]" value="Array">

(which creates empty values in orders_products_attributes.

So going back a step, on the default database in step 3, I get

<label class="attribsSelect" for="attrib-3">Model</label><select rel="dropdown" name="id[3][value]" id="attrib-3">

and on my database, I get

<label class="attribsSelect" for="attrib-27">Mounting Orientation:</label><select rel="dropdown" name="id[27][value]" id="attrib-27">

which looks the same to me.

Gets into init_sanitize fine, but goes from ./includes/classes/AdminRequestSanitizer.php into filterSimpleAlphanumPlus which clobbers the array (line 335).

It looks like on my side, the ParameterDefinitions array does not include the entry for MULTI_DIMENSIONAL.

lat9:

@swguy, you say you're using the demo products, but there's no option named "Mounting Options". If you could identify the specifics of the product and its attributes that you're trying to add to the order, I could probably help.

Morning lat9. Looks like a comparison of operation is being performed between a default zc store and a "live" store, which is the "my database" version. Considering the timing of the discussion and issues, should also note that there appears to be something amiss with the products_attributes table or related with that database as a change to another plugin was required to address sort orders of attributes. That change required not using the sort order provided by routine query to the products_attributes table and instead to use the sort order provided by the products_options_values table. A suggestion was made to correct the issue with the products_attributes table, the status of which is unknown, but alternate software (for more than one reason) was sought.

Or perhaps it is something else as the issue can occur in the default database.

13 May 2016, 12:39 PM
#934
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:

OK, got one. Tried to add the "Big Linked" version of "A Bug's Life ..." entered all the attributes, clicked "Add" and came back to the same screen (with debug-logs generated). At this point, I've got something to work with and will report back when I've got a solution.

If you do a view source on the 4th step (with the Add button), do you get

name="id[1] value="Array"

instead of

name="id[1][value]" id="attrib-1"

Because that means you're seeing the issue.

13 May 2016, 12:41 PM
#935
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, you say you're using the demo products, but there's no option named "Mounting Options". If you could identify the specifics of the product and its attributes that you're trying to add to the order, I could probably help.

Mounting Options is something from my database (which exhibits the problem).

13 May 2016, 1:33 PM
#936
lat9 avatar

lat9

Administrator

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

Re: Edit Orders v4.0 Support Thread

Reproduced using the demo products; see this posting.

13 May 2016, 2:05 PM
#937
lat9 avatar

lat9

Administrator

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

Re: Edit Orders v4.0 Support Thread

@swguy, would you apply the following update to your ADMIN/includes/extra_datafiles/eo_sanitization.php to see if that corrects your issue (it corrected the issue with the demo product)?

<?php
// -----
// Part of the Edit Orders plugin, v4.1.5 or later.  This file defines the level of "sanitization" required by the adminSanitizer function,
// introduced in a patch-level of Zen Cart v1.5.5, so need to make sure that the "proper" version of the class is included.
//
if (defined ('PROJECT_VERSION_MAJOR') && version_compare (PROJECT_VERSION_MAJOR . '.' . PROJECT_VERSION_MINOR, '1.5.5', '>=') && class_exists ('AdminRequestSanitizer') && method_exists ('AdminRequestSanitizer', 'getInstance')) {
    $eo_sanitizer = AdminRequestSanitizer::getInstance();
    $eo_group = array (
        'update_products' => array (
            'sanitizerType' => 'MULTI_DIMENSIONAL',
            'method' => 'post',
            'pages' => array ('edit_orders'),
            'params' => array (
                'update_products' => array ('sanitizerType' => 'CONVERT_INT'),
                'qty' => array ('sanitizerType' => 'FLOAT_VALUE_REGEX'),
                'name' => array ('sanitizerType' => 'PRODUCT_DESC_REGEX'),
                'onetime_charges' => array ('sanitizerType' => 'FLOAT_VALUE_REGEX'),
                'attr' => array (
                    'sanitizerType' => 'MULTI_DIMENSIONAL',
                    'params' => array (
                        'attr' => array ('sanitizerType' => 'CONVERT_INT'),
                        'value' => array ('sanitizerType' => 'PRODUCT_DESC_REGEX'),
                        'type' => array ('sanitizerType' => 'CONVERT_INT')
                    )
                ),
                'model' => array ('sanitizerType' => 'WORDS_AND_SYMBOLS_REGEX'),
                'tax' => array ('sanitizerType' => 'FLOAT_VALUE_REGEX'),
                'final_price' => array ('sanitizerType' => 'FLOAT_VALUE_REGEX'),
            )
        )[B],
        'id' => array (
            'sanitizerType' => 'MULTI_DIMENSIONAL',
            'method' => 'post',
            'pages' => array ('edit_orders'),
            'params' => array (
                'id' => array ('sanitizerType' => 'CONVERT_INT'),
                'type' => array ('sanitizerType' => 'CONVERT_INT'),
                'value' => array ('sanitizerType' => 'PRODUCT_DESC_REGEX'),
            ),
            
        )[/B]
    );
    $eo_sanitizer->addComplexSanitization ($eo_group);
}
13 May 2016, 2:06 PM
#938
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

Will test as soon as I get home.

13 May 2016, 3:39 PM
#939
lat9 avatar

lat9

Administrator

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

Re: Edit Orders v4.0 Support Thread

Never mind; that worked on my test setup (1.5.5+sanitizer updated from 4/12/2016) but fails using the sanitizer that's delivered as part of ZC1.5.5a.

13 May 2016, 3:45 PM
#940
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

ok -standing by.