
Originally Posted by
wickedklown
This problem didnt have to do with batch status. it was just when doing order status via super orders. I rarly use batch status update, or any of those batch's.
should i still preform this fix, and will it fix my current problem?
See wickedklown's post of 14th October 2006, 05:24 PM for background.
This was regarding non-scrubbing of [FONT=Courier New]<br />[/FONT] s from status comments added with super orders. I was experiencing the same problem. When adding one status comment to a single order with super orders, my newlines were being stored as [FONT=Courier New]<br />[/FONT] in the database, and the tags would then also appear when the customer viewed the status comment from within the order page in their zencart account. The html email sent to the customer looked as expected: line breaks where there were line breaks in the original text... it was just subsequent re-display of the stored comment on the customer's order page that had the [FONT=Courier New]<br />[/FONT] tags shown.
SO... I discovered a workaround. I "un-supered" the line that super_orders.php uses to scrub the comments and changed it back to the version in plain-old orders.php. In catalog/admin/super_orders.php , in the vicinity of line 100, I made the following change:
Code:
// 070722: Changed this line to use same function orders.php uses, to fix improper
// scrubbing of <br /> from comments.
$comments = zen_db_prepare_input($_POST['comments']);
// 070722: Original Line
// $comments = zen_db_scrub_in($_POST['comments']);
I believe zen_db_prepare_input() is the function that is builtin to zencart to scrub input prior to database storage, and zen_db_scrub_in() is a function from super orders that performs the same task.
Anyhow, a big disclaimer: This fixed the problem I described, but there obviously is some reason a new function was created to scrub input for super orders, so... user beware. This may have some undesirable effect that I simply haven't noticed yet, although the fact that orders.php uses this line makes me suspect that this will work OK in most situations. Time will tell.
Background info: I did this on an installation with: Zen 1.3.7, Database Patch Level 1.3.7, MySQL 5.0.33, PHP 4.4.5, Apache 2.2.4.
Bookmarks