Comments in tab

  • Posts: 113
  • Thank you received: 2
7 years 8 months ago #264562

-- HikaShop version -- : 3.0.0
-- Joomla version -- : 3.6

Hi guys,

in product page I would like to move the comments in a tabular view, but I want to keep everything else the same, because some products have many comments.
Example: www.laputea.com/it/negozio/prodotti-per-...otto/pentola-bombata
I need only to move the comments and "add a comment" in tabular view, without changing the layout of the right and left view product.
I tried to switch to a tabular view and do some editing with firebug, but the formatting of the right and left parts changes and do not like. I can change the view by default and only move comments in two tabs?
thanks as always for your support!

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

  • Posts: 82906
  • Thank you received: 13378
  • MODERATOR
7 years 8 months ago #264573

Hi,

Yes. You would have to edit the file "show" of the view "product" via the menu Display>Views and change that code:

if($this->productlayout != 'show_tabular') {
	$enable_status_vote = $this->config->get('enable_status_vote', '');
	if(in_array($enable_status_vote, array('comment', 'two', 'both'))) {
?>
	<form action="<?php echo hikashop_currentURL() ?>" method="post" name="adminForm_hikashop_comment_form" id="hikashop_comment_form">
		<div id="hikashop_vote_listing" data-votetype="product" class="hikashop_product_vote_listing">
<?php
		if($this->params->get('show_vote_product')) {
			//LAYOUT listing of the comments for this product
			$js = '';
			if(isset($this->element->main)) {
				$product_id = $this->element->main->product_id;
			} else {
				$product_id = $this->element->product_id;
			}
			$this->params->set('product_id',$product_id);
			echo hikashop_getLayout('vote', 'listing', $this->params, $js);
?>
		</div>
		<div id="hikashop_vote_form" data-votetype="product" class="hikashop_product_vote_form">
<?php
			//LAYOUT form to send a comment & vote
			$js = '';
			if(isset($this->element->main)) {
				$product_id = $this->element->main->product_id;
			} else {
				$product_id = $this->element->product_id;
			}
			$this->params->set('product_id',$product_id);
			echo hikashop_getLayout('vote', 'form', $this->params, $js);
		}
?>
		</div>
		<input type="hidden" name="add" value="1"/>
		<input type="hidden" name="ctrl" value="product"/>
		<input type="hidden" name="task" value="show"/>
		<input type="hidden" name="return_url" value="<?php echo urlencode(base64_encode(urldecode($this->redirect_url))); ?>"/>
	</form>
<?php
	}
}
in order to add your tabs tags around both DIVs.

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

  • Posts: 113
  • Thank you received: 2
7 years 8 months ago #264696

Hi Nicolas,

thanks for your answer. I tried to change the code, but I can not. Please, can you give me the correct code? They are not very practical for php, I understand the code to be changed, but I do not know... If you have time, I can send the data of the site access. Thanks for your patience! :)

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

  • Posts: 26159
  • Thank you received: 4028
  • MODERATOR
7 years 8 months ago #264701

Hi,

I'm sorry but our support cannot provide such kind of help on customization.
If you need help with your customization and you do not have the PHP/Development knowledge, I recommend you to contact an integrator.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

Time to create page: 0.057 seconds
Powered by Kunena Forum