@gernot, I missed these corrections in v4.5.1 but have the changes staged for the next EO release, see this GitHub issue for details.
Printable View
@gernot, I missed these corrections in v4.5.1 but have the changes staged for the next EO release, see this GitHub issue for details.
Now available for download: https://www.zen-cart.com/downloads.php?do=file&id=1513
Bugs found in 1.55f install:
Duplicate edit button remains...
This bit of code:
<td class="dataTableContent" align="center"><?php echo (zen_get_orders_comments($orders->fields['orders_id']) == '' ? '' : zen_image(DIR_WS_IMAGES . 'icon_yellow_on.gif', TEXT_COMMENTS_YES, 16, 16)); ?></td>
<td class="dataTableContent noprint" align="right"><?php // echo '<a href="' . zen_href_link(FILENAME_ORDERS, zen_get_all_get_params(array('oID', 'action')) . 'oID=' . $orders->fields['orders_id'] . '&action=edit', 'NONSSL') . '">' . zen_image(DIR_WS_IMAGES . 'icon_edit.gif', ICON_EDIT) . '</a>'; ?><?php // if (isset($oInfo) && is_object($oInfo) && ($orders->fields['orders_id'] == $oInfo->orders_id)) { echo zen_image(DIR_WS_IMAGES . 'icon_arrow_right.gif', ''); } else { echo '<a href="' . zen_href_link(FILENAME_ORDERS, zen_get_all_get_params(array('oID')) . 'oID=' . $orders->fields['orders_id'], 'NONSSL') . '">' . zen_image(DIR_WS_IMAGES . 'icon_info.gif', IMAGE_ICON_INFO) . '</a>'; } ?> </td>
<?php
//-bof-edit_orders-lat9 *** 8 of 8 *** (Add content based on previous notification + new zc156 notification)
// -----
// A watching observer can provide an associative array in the form:
needs to look like this:
<td class="dataTableContent" align="center"><?php echo (zen_get_orders_comments($orders->fields['orders_id']) == '' ? '' : zen_image(DIR_WS_IMAGES . 'icon_yellow_on.gif', TEXT_COMMENTS_YES, 16, 16)); ?></td>
<!-- Twitch remove for edit orders 4.51 duplication - <td class="dataTableContent noprint" align="right"><?php // echo '<a href="' . zen_href_link(FILENAME_ORDERS, zen_get_all_get_params(array('oID', 'action')) . 'oID=' . $orders->fields['orders_id'] . '&action=edit', 'NONSSL') . '">' . zen_image(DIR_WS_IMAGES . 'icon_edit.gif', ICON_EDIT) . '</a>'; ?><?php // if (isset($oInfo) && is_object($oInfo) && ($orders->fields['orders_id'] == $oInfo->orders_id)) { echo zen_image(DIR_WS_IMAGES . 'icon_arrow_right.gif', ''); } else { echo '<a href="' . zen_href_link(FILENAME_ORDERS, zen_get_all_get_params(array('oID')) . 'oID=' . $orders->fields['orders_id'], 'NONSSL') . '">' . zen_image(DIR_WS_IMAGES . 'icon_info.gif', IMAGE_ICON_INFO) . '</a>'; } ?> </td> -->
<?php
//-bof-edit_orders-lat9 *** 8 of 8 *** (Add content based on previous notification + new zc156 notification)
// -----
// A watching observer can provide an associative array in the form:
Second critical bug was a problem since version 4.3.5 - 4.51...
Editing an order in admin - edit_orders.php will erase the delivery selection and all associated values.
In 4.3.5 - order details above the delivery line can be changed and do pass to the updated order.
In 4.5.1 - order details are not changed and delivery selection and values are lost.
Editing an order will corrupt the data and overwrite it in the database.
1.55f running on PHP 7.1 and the errors occur on PHP 7.3
For the first issue (it would have helped if you'd highlighted the changes), I'm (a) assuming that these are the changes to the zc155f admin/orders.php and (b) the only 8 of 8 that I found in the EO distribution was down towards the status-history section. Here's that section from the EO distribution; the comment looks the same as that you posted, but the code leading into it doesn't:
For the second issue, I'm unable to replicate on a fresh zc155f/eo451 installation ... but maybe I don't understand what "the delivery line" means. If you're talking about the product pricing, there are now settings that control EO's pricing calculation method, as identified in the readme.Code:<td class="dataTableContent" align="center"><?php echo (zen_get_orders_comments($orders->fields['orders_id']) == '' ? '' : zen_image(DIR_WS_IMAGES . 'icon_yellow_on.gif', TEXT_COMMENTS_YES, 16, 16)); ?></td>
<?php
//-bof-edit_orders-lat9 *** 8 of 8 *** (Add content based on previous notification + new zc156 notification)
// -----
// A watching observer can provide an associative array in the form:
//
// $extra_data = array(
// array(
// 'align' => $alignment, // One of 'center', 'right', or 'left' (optional)
// 'text' => $value
// ),
// );
//
// Observer note: Be sure to check that the $p3/$extra_data value is specifically (bool)false before initializing, since
// multiple observers might be injecting content!
//
$extra_data = false;
$zco_notifier->notify('NOTIFY_ADMIN_ORDERS_LIST_EXTRA_COLUMN_DATA', (isset($oInfo) ? $oInfo : array()), $orders->fields, $extra_data);
The default is to automatically (i.e. based on database settings) calculate; perhaps you haven't updated that setting?
The first issue needs the <td> extra edit button removed/hidden out of the gate or your 8 of 8 will duplicate the button.
Second the loworderfee, product name, product model will not update changes in 4.51 it will retain the data - NOT the changes - for product name, model if anything is changed the delivery low order fee will be removed and any other relative order totals are also changed/removed or not included.
After reviewing the code and the settings in config it appears the updates are not being considered correctly or accounted for in the 'matrix' these settings create. Meaning - one setting for auto pricing might work great to calculate the new prices/changes but neglects to include the low order fee during the update.
Oddly if I manually enter in a delivery fee amount to replace the 'automatically reset' $0.00 values - it will update and retain the manually entered data - only after it has deleted the original values an overwritten the master order data thus corrupting it.
As a result there is no backup for these lost order details less the order emails from admin - to the customer.
For the first, I'm not seeing that on a "fresh" zc155f /admin/orders.php. I'll note (again) that the code that you posted is different from the zc155f version distributed by EO.
For the second, I'll look into the integration with the loworderfee (presuming that you're using that built into Zen Cart) and will note initially that the order-total is using the shopping-cart values to do its calculations instead of the information stored in the order itself.
Thanks for the info, one of the problems is that the order total modules/classes are not being considered when recalculating the proper order total.
From what I can see they are hard coded filters. So, when an order is processed if there are any name changes or variations or alternate values in the class beyond what EO has written they will not be included but what's worse is the code will erase the entire 'old' data and only add the new.
For example: Reward Points class = ot_reward_points_display will not be recognized as there is no code identifying what is in the order data dynamically then deciding what to do with it without just bulldozing the new data in.
That explains also why reward points is not being recalculated during EO updates.
FWIW, I just verified that the ot_loworder fee is added/subtracted when the order is updated on a fresh zc155f/eo451 installation.
From what I've seen of the Reward Points plugin, it's got too many tentacles into the cart-related processing to allow it to interoperate with Edit Orders.
I'm not sure what you mean by "hard coded filters"; there are some processing variations for some order-totals but for the most part, if an order-total is installed it's given the opportunity to run and make its changes to the order itself.
Thanks lat9, I'll get them all working together later today.