Load Comment and Vote when use jcomment plugin

  • Posts: 31
  • Thank you received: 3
6 years 5 months ago #282638

-- url of the page with the problem -- : #
-- HikaShop version -- : 3.2.1
-- Joomla version -- : 3.8.1
-- PHP version -- : 7
-- Browser(s) name and version -- : Firefox 56

Hello
I've done the settings and show comments in product details
But I can not change the display of comments
How can I display comments in other situations?
Please give detailed guidance or send the code to resolved problem
thanks

Last edit: 6 years 5 months ago by p30yaran.

Please Log in or Create an account to join the conversation.

  • Posts: 81509
  • Thank you received: 13064
  • MODERATOR
6 years 5 months ago #282652

Hi,

I'm sorry but I don't understand what you mean.
Why are you saying you can't change the display of comments ? You sure can use CSS and view overrides to change the display of the comments.
And in which other situation do you want to display comments ? Comments are attached to products so it's normal they are on the product page. Where else would they be ?
If you want a generic comment system for your website to be able to comment Joomla articles, and other content, then you want to use a comment extension for Joomla and not the comment system of HikaShop.

The following user(s) said Thank You: p30yaran

Please Log in or Create an account to join the conversation.

  • Posts: 31
  • Thank you received: 3
6 years 5 months ago #282739

hello
thanks for your response
Comments are displayed at the bottom of the product description
How can I change the position of its display?
for example:
Show comments on top of characteristic
The code to display comments in what php file is written
What is this display comment code?

Attachments:
Last edit: 6 years 5 months ago by p30yaran.

Please Log in or Create an account to join the conversation.

  • Posts: 81509
  • Thank you received: 13064
  • MODERATOR
6 years 5 months ago #282769

Hi,

You'll have to edit the view file displaying the product page, to move arround the difference pieces to display like you want.
In would recommend to first read this:
www.hikashop.com/support/documentation/1...-display.html#layout
It explains how to do view overrides and how to know which view file to edit exactly.

The following user(s) said Thank You: p30yaran

Please Log in or Create an account to join the conversation.

  • Posts: 31
  • Thank you received: 3
4 years 11 months ago #305944

thanks Nicolas
How can I change the position of the comments ?
when Jcomment is active on the configuration?

Please Log in or Create an account to join the conversation.

  • Posts: 81509
  • Thank you received: 13064
  • MODERATOR
4 years 11 months ago #305952

Hi,

It's not easy.
Thrid party comment extensions are displayed with the code:

<div class="hikashop_external_comments" id="hikashop_external_comments" style="clear:both">
<?php
if($this->config->get('comments_feature') == 'jcomments') {
	$comments = HIKASHOP_ROOT . 'components' . DS . 'com_jcomments' . DS . 'jcomments.php';
	if(file_exists($comments)) {
		require_once ($comments);
		if(hikashop_getCID('product_id') != $this->product->product_id && isset($this->product->main->product_name)) {
			$product_id = $this->product->main->product_id;
			$product_name = $this->product->main->product_name;
		} else {
			$product_id = $this->product->product_id;
			$product_name = $this->product->product_name;
		}
		echo JComments::showComments($product_id, 'com_hikashop', $product_name);
	}
} elseif($this->config->get('comments_feature') == 'jomcomment') {
	$comments = HIKASHOP_ROOT . 'plugins' . DS . 'content' . DS . 'jom_comment_bot.php';
	if(file_exists($comments)) {
		require_once ($comments);
		if(hikashop_getCID('product_id') != $this->product->product_id && isset($this->product->main->product_name))
			$product_id = $this->product->main->product_id;
		else
			$product_id = $this->product->product_id;
		echo jomcomment($product_id, 'com_hikashop');
	}
} elseif($this->config->get('comments_feature') == 'komento') {
	$comments = HIKASHOP_ROOT . 'components' . DS . 'com_komento' . DS . 'bootstrap.php';
	if(file_exists($comments)) {
		require_once ($comments);
		echo KT::commentify('com_hikashop', $this->product, array('params' => ''));
	}
}
?>
	</div>
in the file product/show.php that you can edit via the menu Display>Views.
So you cand move that block of code to move the comments section.
You can move it in the same view file or in a "sub" view file, like for example product/show_default.php which contains the default layout of the product page.
However, if you move it, you'll end up having the new comment form inside the HikaShop product page form. And in HTML, you can't have a form inside another form... it doesn't work properly. So if you do that, you'll probably end up with issues either with the new comment form or with the add to cart button.
You can try, but it will likely not be possible unless you do some more heavy code modifications to move the form tags so that one doesn't end up inside the other one.

Please Log in or Create an account to join the conversation.

Time to create page: 0.072 seconds
Powered by Kunena Forum