Re: Edit Orders v4.0 Support Thread
Quote:
Originally Posted by
yesaul
array-merge "merges the elements of one or more arrays together so that the values of one are appended to the end of the previous one. It returns the resulting array. If the input arrays have the same string keys, then the
later value for that key will overwrite the previous one"
(source:
http://php.net/manual/en/function.array-merge.php)
$new_product must be overwritten by $product_update (but not vice versa - as exactly $product_update contains information about new price got from $_POST)
Thus, why the previous version is not correct ??
Code:
// Adjust the product information based upon the
// data found in update_products
$new_product = array_merge($new_product, $product_update);
(I have got issue with price update exactly with latest code version, but never with previous...)
I understand how array_merge works:smile:; unfortunately, the solution for the previous issue presented (i.e. that updated attributes' pricing wasn't being honored) required that the $new_product information (that includes that updated pricing) overwrite the values entered on the form ... resulting in the issue you've identified.
It looks like EO will need to record (in hidden inputs) the initial price displayed for each product and, if that price is updated, use the entered price instead of re-calculating.
Re: Edit Orders v4.0 Support Thread
FWIW, I've created this GitHub issue to discuss and track the above change.
Re: Edit Orders v4.0 Support Thread
Quote:
Originally Posted by
lat9
I understand how array_merge works:smile:;
Thank you for prompt reply.
I'm pretty sure, you understand how array_merge works, but I haven't been sure if I do too...
To my happiness, I do not use products with attributes.
And is seems, for people like me the previous version of code is correct, but not new.
Re: Edit Orders v4.0 Support Thread
Quote:
Originally Posted by
yesaul
Thank you for prompt reply.
I'm pretty sure, you understand how array_merge works, but I haven't been sure if I do too...
To my happiness, I do not use products with attributes.
And is seems, for people like me the previous version of code is correct, but not new.
Until I think this through for the general case, you should reverse the order of that array_merge statement to its previous version:
Code:
$new_product = array_merge($new_product, $product_update);
... so that the values from the form ($product_update) overwrite the new calculations ($new_product).
Re: Edit Orders v4.0 Support Thread
Yes the file exists. If I set the IS_ADMIN_FLAG to true everything works fine.
Re: Edit Orders v4.0 Support Thread
Quote:
Originally Posted by
s-thomas
Hi there
I just installed the module and am running into an issue that I have tracked down to the (IS_ADMIN_FLAG === true) in the /includes/classes/shipping file.
I am using Edit orders 4.1.7 and running Zen Cart 1.5.4
In the admin section the pages are not loading because of an file load error. If I hack the IS_ADMIN_FLAG then the pages loads with out errors. I am going with the assumption that there is an issue with the admin files calling the catalog files or that there is an issue with using a shipping file that is a core 1.5.5a when I am running 1.5.4. Any help would be appreciated.
Thanks
Code:
if (IS_ADMIN_FLAG === true) {
$lang_file = zen_get_file_directory(DIR_FS_CATALOG . DIR_WS_LANGUAGES . $_SESSION['language'] . '/modules/shipping/', $include_modules[$i]['file'], 'false');
$module_file = DIR_FS_CATALOG . $module_file;
} else {
$lang_file = zen_get_file_directory(DIR_WS_LANGUAGES . $_SESSION['language'] . '/modules/shipping/', $include_modules[$i]['file'], 'false');
}
[20-Mar-2018 13:50:06 America/Los_Angeles] PHP Warning: include_once(includes/modules/shipping/canadapost.php): failed to open stream: No such file or directory in /home/xxx/public_html/includes/classes/shipping.php on line 64
[20-Mar-2018 13:50:06 America/Los_Angeles] PHP Warning: include_once(): Failed opening 'includes/modules/shipping/canadapost.php' for inclusion (include_path='.:/usr/local/lib/php') in /home/xxx/public_html/includes/classes/shipping.php on line 64
[20-Mar-2018 13:50:06 America/Los_Angeles] PHP Fatal error: Class 'canadapost' not found in /home/xxx/public_html/includes/classes/shipping.php on line 65
@mc12345678 Yes the file exists. If I set the IS_ADMIN_FLAG to true everything works fine.
Re: Edit Orders v4.0 Support Thread
1.5.5f
Super Orders 10K, Edit Orders 4.3.3, Ty-Package Tracker 3.1.5
PHP 5.6, only because Super Orders doesn't support 7 and above yet/ever...lol
I'm at a bit of a loss as everything has been working fine on our site until earlier today.
We updated to EditOrders 4.3.3, cleaned up SO code and got Ty Package Tracker working again 2 weeks ago and everything has been working great
Until earlier today when I suddenly began getting Admin Debug Logs complaining about some code in Admin/orders.php and the EditOrders screen stopped updating line items when I made changes and clicked on "Update"
mc12345678 helped me through the DeBug log issue, thank you very much, by supplying me with a couple of code changes to the SO code in admin/orders.php and admin/super_data_sheet.php, but I am still fighting the no update issue.
If I go to EditOrders from the SuperOrder's Order page, change the price of a line item and click "Update" the system acts like it is doing something, the screen refreshes and the changes I made are converted back to the original entry but no DeBug files are generated as if there was no error.
I'm starting to wonder if I should remove Super Orders but I really need the Split Order and payment functions.
Any assistance would be greatly appreciated
1 Attachment(s)
Re: Edit Orders v4.0 Support Thread
Quote:
Originally Posted by
wsworx
1.5.5f
Super Orders 10K, Edit Orders 4.3.3, Ty-Package Tracker 3.1.5
PHP 5.6, only because Super Orders doesn't support 7 and above yet/ever...lol
I'm at a bit of a loss as everything has been working fine on our site until earlier today.
We updated to EditOrders 4.3.3, cleaned up SO code and got Ty Package Tracker working again 2 weeks ago and everything has been working great
Until earlier today when I suddenly began getting Admin Debug Logs complaining about some code in Admin/orders.php and the EditOrders screen stopped updating line items when I made changes and clicked on "Update"
mc12345678 helped me through the DeBug log issue, thank you very much, by supplying me with a couple of code changes to the SO code in admin/orders.php and admin/super_data_sheet.php, but I am still fighting the no update issue.
If I go to EditOrders from the SuperOrder's Order page, change the price of a line item and click "Update" the system acts like it is doing something, the screen refreshes and the changes I made are converted back to the original entry but no DeBug files are generated as if there was no error.
I'm starting to wonder if I should remove Super Orders but I really need the Split Order and payment functions.
Any assistance would be greatly appreciated
I enabled EOs debug feature and attached the file here if that will help.Attachment 17754
Re: Edit Orders v4.0 Support Thread
Quote:
Originally Posted by
wsworx
1.5.5f
Super Orders 10K, Edit Orders 4.3.3, Ty-Package Tracker 3.1.5
PHP 5.6, only because Super Orders doesn't support 7 and above yet/ever...lol
I'm at a bit of a loss as everything has been working fine on our site until earlier today.
We updated to EditOrders 4.3.3, cleaned up SO code and got Ty Package Tracker working again 2 weeks ago and everything has been working great
Until earlier today when I suddenly began getting Admin Debug Logs complaining about some code in Admin/orders.php and the EditOrders screen stopped updating line items when I made changes and clicked on "Update"
mc12345678 helped me through the DeBug log issue, thank you very much, by supplying me with a couple of code changes to the SO code in admin/orders.php and admin/super_data_sheet.php, but I am still fighting the no update issue.
If I go to EditOrders from the SuperOrder's Order page, change the price of a line item and click "Update" the system acts like it is doing something, the screen refreshes and the changes I made are converted back to the original entry but no DeBug files are generated as if there was no error.
I'm starting to wonder if I should remove Super Orders but I really need the Split Order and payment functions.
Any assistance would be greatly appreciated
Although lat9 has temporarily reversed the suggestion of Post 1271, curious if that revision resolves the issue.
Re: Edit Orders v4.0 Support Thread
Quote:
Originally Posted by
s-thomas
@mc12345678 Yes the file exists. If I set the IS_ADMIN_FLAG to true everything works fine.
This is unusual and not fully clarified. The IS_ADMIN_FLAG has been part of ZC for some time and as edit_orders is run from the admin, the value should already be true it seems (haven't reviewed the code to validate/contradict that theory). Where in the code is this "new" setting being applied and is it something that is not properly managed in the problem shipping module?