This site has been archived and you can no longer log in or post new messages. For up-to-date community resources please visit

eZ Community » Forums » Setup & design » Comment a product

Comment a product

Comment a product

Wednesday 22 September 2010 4:31:30 pm - 2 replies


is there a solution to comment a product? Has anybody an idea?

Thank you in advance.



Wednesday 22 September 2010 8:03:49 pm

The easiest way is to include the "comments" parts from ezwebin.:

<div class="attribute-comments">                                    
<a name="comments" id="comments"></a>                                    
<div class="content-view-children">                                        
{foreach fetch_alias( comments, hash( parent_node_id, $node.node_id ) ) as $comment}                                            
{node_view_gui view='line' content_node=$comment}                                        
{if fetch( 'content', 'access', hash( 'access', 'create', 'contentobject', $node, contentclass_id, 'comment' ) )}                                   
<form method="post" action={"content/action"|ezurl}>    
<input type="hidden" name="ClassIdentifier" value="comment" />              
<input type="hidden" name="NodeID" value="{$node.object.main_node.node_id}" />   
<input type="hidden" name="ContentLanguageCode" value="{ezini( 'RegionalSettings', 'ContentObjectLocale', 'site.ini')}" />                                       
<input class="new_comment button" type="submit" name="NewButton" value="{'New comment'|i18n( 'design/ezwebin/full/article' )}" />                                   
{if ezmodule( 'user/register' )}                                           
<p>{'%login_link_startLog in%login_link_end or %create_link_startcreate a user account%create_link_end to comment.'|i18n( 'design/ezwebin/full/blog_post', , hash( '%login_link_start', concat( '<a href="', '/user/login'|ezurl(no), '">' ), '%login_link_end', '</a>', '%create_link_start', concat( '<a href="', "/user/register"|ezurl(no), '">' ), '%create_link_end', '</a>' ) )}</p>                                       
<p>{'%login_link_startLog in%login_link_end to comment.'|i18n( 'design/ezwebin/article/comments', , hash( '%login_link_start', concat( '<a href="', '/user/login'|ezurl(no), '">' ), '%login_link_end', '</a>' ) )}</p>             

Just remember to give the users you want to be able to comment, the access to add comments.

'content', 'create', class( 'comment' ), parent class( 'product' )

And edit the product class to be a container..

Modified on Wednesday 22 September 2010 8:08:13 pm by Håvard Bergersen

Thursday 23 September 2010 9:05:58 am

Hi Håvard,

it's working fine. Thanks a lot! happy.gif Emoticon

Best regards from Hamburg // Henning


You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from