Closed GoogleCodeExporter closed 9 years ago
Original comment by zetapri...@gmail.com
on 4 Mar 2011 at 10:24
I did some work on this and made a comment form for customer front end.
Along the way I encountered few things that might be a problem.
1. When comment is posted (in admin) there is no record kept of who posted the
comment.
2. Comments are displayed using template file and there is no programmatic way
to alter its content.
3. On front end order details page, if there are any comments for an order they
are displayed right bellow order items details. After that list there is a
'back' link displayed. All this is done in one template file. So again no
programmatic way to stick comment form between list of comments and 'back' link.
4. This is not actually a problem but something I want to point. Comments are
shown in newest to oldest order from top to bottom. Should we keep it this way
or reverse the order?
For customer comments, I have created a reference table, where I save customer
ID with comment ID, so getting customer name for display is not a problem. If
you want to have backend user name displayed too, then I will need to capture
comment post event and get admin user id and store it too.
About problems 2 and 3 I see 2 approaches:
1. Create our own templates the way we like them and replace Magento templates.
2. Create our templates with some JavaScript data that we need, inject them
after Magento templates and use JavaScript to decorate default magento content
- add user names, may be some classes to comments to tell apart admin from user
comments visually.
First approach seem better to me but we'll have to make sure our templates are
compatible with each new magento version.
Second approach is good to make sure that if another extension changes same
templates for its own purposes, our decoration will still work or could be
easily adapted to work.
I would like to hear any thoughts before going any further with that.
Original comment by jamb...@gmail.com
on 10 Mar 2011 at 9:27
Let's use JS.
I wouldn't worry too much about showing customer name.
Even showing it as Customer: .... will be fine. Keep it simple.
Original comment by zetapri...@gmail.com
on 10 Mar 2011 at 9:40
Initial release pushed to repo r1433
Installed extension on mageimage.
Now every registered customer can post comments in their order detail page.
Those comments will be visible on both front end and back end of the site on
order details pages.
For admin comments to appear to customer, admin MUST check 'Visible on
Frontend' check box when submitting a comment. If an email to the customer
should be sent, check 'Notify Customer by Email'.
Customer and admin comments have slight visual differences in background and
border colors.
In admin on top of every customer comment there is 'Customer:' label.
In frontend next to every comment there is either 'You:' label if comment is
posted by customer or 'Admin:' if comment is posted by admin.
Comments on frontend are posted using AJAX, so no page reload should happen.
Post some comments to orders and see if all works.
Original comment by jamb...@gmail.com
on 10 Mar 2011 at 9:30
1. Comments loose line breaks. Any change you can insert <BR> or split them
into <P>?
2. Probably use this sandy color for comments posted by the other party and no
b/g for your own comments. Or just set sandy for one and no b/g for the other.
3. There is a delay in showing ADMIN/YOU. It was visible enough on my machine
to notice.
4. Adding a comment in the admin resets the way they look, looses who posted
what.
5. "Customer notified" msg on comments placed by the customer are totally
misleading.
Otherwise I think we are good.
Original comment by zetapri...@gmail.com
on 10 Mar 2011 at 10:16
Now all but 2 are connected to my comment @2.
1. I noted this in commit comment, but will repeat it here. When magento
outputs the comments it uses escapeHtml($comment), this effectively turns any
html like characters to entities. If I put <br/> anywhere in comment it will
not result in line break, but in displaying it literally.
3. The delay is because all admin, you labels are inserted using javascript.
4. I haven't altered how comments are posted from admin. It probably fetches
all comments from server once more to display them. It can be fixed.
5. Again, this is what the template does. It puts one of three messages,
customer notified, customer not notified and notification not applicable.
All of the above problems occur from the fact that we are using magento
templates to display those comments, and magento templates in this case are not
designed for that.
I can probably make all your notes work using JavaScript, but this will cause
the delay you mentioned to be even more visible.
Another solution is to override default templates and hope that no other
extension will do the same. Which if we are going to keep this internal is not
very likely to be a problem.
And final solution is to implement our own notification system that is totally
separate from those order comments.
Quickest to do is JavaScript then overriding templates and last option will
take more time.
Original comment by jamb...@gmail.com
on 11 Mar 2011 at 8:42
Agree. Just noted the problems I spotted from the user point of view.
When you say out notification system, do you mean using something totally
separate outside magento or implementing it within magento?
We just need to find a compromise between the time we have to get this going
and the usability of it all.
Not keen of messing with the template, unless there is a separate template for
comments only.
It's of no use for us if we cannot insert line breaks. Writing instructions
becomes impossible. Can you check line breaks with JS and insert BRs on the fly
every time it is displayed? Those line breaks are there. Just need a
replacement. The page will be even more "jumpy" after that. :(
Original comment by zetapri...@gmail.com
on 11 Mar 2011 at 8:59
When I say our - I mean it is still similar to those comments, but add another
section to order details or something like that. Haven't thought in too much
detail.
Unfortunately comments are mixed with other details on front page.
Admin comment form is separate template that handles only comment submission
and display.
As I said, I can insert <br> in php and if it is escaped, use javascript to
replace literal <br> with actual tags. I can opt for hiding comments them
selves until all JS processing is done. It will be still slight delay but you
will get a completely formated view when its over.
Original comment by petar....@gmail.com
on 11 Mar 2011 at 9:13
Whatever works for you - either replace line breaks in PHP or in HTML with JS.
The rest is minor.
Put it in MagentoConnect when ready. Copy a description template from any of
our other extensions. Don't forget to have a link to us from there and our
email for support.
Original comment by zetapri...@gmail.com
on 11 Mar 2011 at 9:53
Addressed all your concerns. Mainly using javascript.
r1434 and r1435
All this is developed and tested on 1.5 only.
Test on mageimage.
Original comment by jamb...@gmail.com
on 11 Mar 2011 at 3:43
Added to magentocommerce
Original comment by jamb...@gmail.com
on 11 Mar 2011 at 3:54
Tested on /mageimage/
1. Customer feedback is faulty in IE (customer_IE.png). Customer comments are
not in different color and the "Customer" label is at the end of the comment it
self.
2. Admin comment line breaks show up as <br> in the frontend
(front_end_line.png). Line breaks in customer comments show up ok, on the other
hand.
3. Links don't show as links in admin nor frontend (links_in_comments.png).
4. Wasn't able to test how emails show at all. For some reason, I couldn't get
/mageimage/ to send me an email. Am I missing something obvious?
Suggestion:
I think we should either reverse the ascending/descending order of the comments
or move the input box at the top. It seems reversed to me and a bit confusing
at first glance.
Original comment by agur...@gmail.com
on 17 Mar 2011 at 3:56
Attachments:
1. This a to be a JS error of some sort. Will take a look at some point.
2. By default no html is allowed in comments and shows literally. As I have
mentioned in previous comments, these were not intended for rich discussion. I
am replacing literal html with actual html but only for br tags. Anything else
is potential vulnerability.
3. Same as above, all tags are stripped except br.
4. I have installed
http://www.magentocommerce.com/magento-connect/ASchroder/extension/1865/aschrode
r.com-smtp-pro as part of another issue and it logs all emails that are being
sent. You can see a log of all emails in System > Tools > Email log
Original comment by jamb...@gmail.com
on 17 Mar 2011 at 6:13
See now if the problems persist.
Original comment by jamb...@gmail.com
on 18 Mar 2011 at 12:04
Tested on /mageimage/
web_to_print_store_incl_theme 1.8.4.0alpha31 (alpha)
1. Test OK
2. Customer comments with line breaks don't show until page refresh. Same for
all browsers. Replicate this way:
- Input multiline comment in an order as a customer and submit it
- You will see all your separate paragraphs as one paragraph without line breaks
- Refresh the page and they get fixed
3. So, we're not to expect this one to be resolved, right? URLs cannot be
actual linked text?
4.1. Email notification template content/text needs to be decided upon. This
can be done further on down the track, ofcourse. For now, I suggest this as a
small change to the default template (admin_notification.png).
4.2. Line breaks also don't show in notification emails (ex.
customer_notification.png).
Original comment by agur...@gmail.com
on 18 Mar 2011 at 2:14
Attachments:
2. Should be fixed now.
3. I wouldn't go that way. These comments should serve as chat like message
boards. If we start adding rich text capabilities that will complicate things
without bringing too much good. Another thing is that in backend it will be
hard to represent html in comments without overriding php templates. If you
decide that we MUST support links then I will see what can be done.
4. You're right. Email notification template content/text needs to be decided
upon.
Customer template is default magento one so no wander there are no line breaks.
Admin template typo is fixed.
Original comment by jamb...@gmail.com
on 18 Mar 2011 at 3:55
2. Test OK
3. Lets leave it up to Max.
4. Typo fix OK. Line breaks not showing correctly in notification emails. Up to
max weather we should have them fixed.
Original comment by agur...@gmail.com
on 18 Mar 2011 at 4:51
Can you post what the emails look like here?
Original comment by zetapri...@gmail.com
on 18 Mar 2011 at 5:41
Original comment by ad...@zetaprints.com
on 20 Apr 2011 at 7:31
Original issue reported on code.google.com by
zetapri...@gmail.com
on 27 Feb 2011 at 7:53