Ok - I think I have come up with a solution to this now. I have done as I suggested and added an extra dimension to the front of the id array which is the $orders_products_id value.
For example - Line 903 in edit_orders.php
Code:
echo '<textarea class="attribsTextarea" name="id[' .$optionID[$j] . '][value]" rows="' . $optionInfo['rows'] .
'" cols="' . $optionInfo['size'] . '" id="attrib-' .
$optionID[$j] . '" >' . $text . '</textarea>' . "\n";
becomes
Code:
echo '<textarea class="attribsTextarea" name="id['.$orders_products_id.'][' . $optionID[$j] . '][value]" rows="' . $optionInfo['rows'] .
'" cols="' . $optionInfo['size'] . '" id="attrib-' .
$optionID[$j] . '" >' . $text . '</textarea>' . "\n";
and then, when this array is read from $_POST on line 276
Code:
zen_db_prepare_input($_POST['id']),
becomes
Code:
zen_db_prepare_input($_POST['id'][$orders_products_id]),
I have had a quick (but not thorough!) test of this, and it seems to work - can anyone see any reasons as to why this might cause problems elsewhere?
I now seem to have a problem in that the Sub-Total and hence, the Total never update, and they can't be modified manually, so the order totals cannot be changed, only by adding additional total lines (but then these get removed again upon updating the order). Is this expected functionality, have I missed something or is this a bug?
Cheers,
Scott
Bookmarks