Customer rating on the product page in an individual place

  • Posts: 102
  • Thank you received: 12
  • Hikashop Business
2 years 10 months ago #341063

Hello,

we want to put the customer review in a special area of ​​the product page show_default.php. In this php file there is currently only hikashop_product_vote_mini, what has to be inserted so that the complete comment area is visible?

Currently, this is only visible at the end of the product page via the setting via System->Properties, which is not so suitable for us.

It would be great if I could get a tip on how to do this. Thanks very much.

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

  • Posts: 83402
  • Thank you received: 13495
  • MODERATOR
2 years 10 months ago #341066

Hi,

The comment area is added at the end of the product / show view file which englobes the product / show_default view file.
That's because the comment form needs to be outside the form of the product page which is all around the product / show_default view file.
If you check the product / show_tabular view file, you can see that we moved the end of the product page form before the tabular area and that way, we were able to display the comment form inside one of the tabs of that view file.
So if you want to move around the comment form, you would also have to do something similar in show_default (and modify the show view file as well consequently).

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

  • Posts: 102
  • Thank you received: 12
  • Hikashop Business
2 years 10 months ago #341110

Hello Nicolas,

Thanks for the feedback. I've tried a bit about this, but haven't come up with a real solution to postpone the voting.

I think it's easier to use the show_tabular view and modify/extend the previous tablespaces.

Currently available:
- Description
- Specifications
- Comment
- To comment

I need:
- Description
- Downloads
- Product video
- Comment
- To comment

I would create new product fields for the two areas download and product video. Now the question arises, how can I extend this in show_tabular?

On specification (which I don't need) the two codes are:
TAB TITLE:
<!-- SPECIFICATION TAB TITLE -->
<?php if(!empty($specif_tab_content)) {
if(empty($selected)) $selected = 'hikashop_show_tabular_specification'; ?>
<li id="hikashop_show_tabular_specification_li" class="hikashop_tabs_li ui-corner-top"><?php echo JText::_('SPECIFICATIONS');?></li>
<?php } ?>
<!-- EO SPECIFICATION TAB TITLE -->

DISPLAY:
<!-- SPECIFICATIONS -->
<?php
echo $specif_tab_content;
?>
<!-- EO SPECIFICATIONS -->

I can change the info text for TAB-TITLE by writing "echo JText::_('Video');?" instead of "echo JText::_('SPECIFICATIONS');?".
I can change the DISPLAY by inserting "echo $this->element->video;" instead of "echo $specif_tab_content;".

But what needs to be set/supplemented to get another choice?

Unfortunately, I also found that the individual buttons of the selection areas in the mobile view move into each other. Is there a setting option for this?

Greetings from Christian

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

  • Posts: 83402
  • Thank you received: 13495
  • MODERATOR
2 years 10 months ago #341111

Hi,

Adding new tabs to the tab system in show_tabular will indeed be way easier.
We actually have a documentation on this in the "How to add a tab in the tabular view ?" section of our FAQ:
www.hikashop.com/support/documentation/106-faq.html#layo

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

  • Posts: 102
  • Thank you received: 12
  • Hikashop Business
2 years 10 months ago #341121

Hello Nicolas,

Thank you for the explanation, but it doesn't work.

I modified the code as described:

		<ul class="hikashop_tabs_ul">
<!-- DESCRIPTION TAB TITLE -->
<?php if(!empty($description) || !empty ($this->element->product_url)) {
		if(empty($selected)) $selected = 'hikashop_show_tabular_description'; ?>
			<li id="hikashop_show_tabular_description_li" class="hikashop_tabs_li ui-corner-top"><?php echo JText::_('PRODUCT_DESCRIPTION');?></li>
<?php } ?>
<!-- EO DESCRIPTION TAB TITLE -->

<!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Eigene Tabs -->
<li id="hikashop_show_tabular_custom_li" class="hikashop_tabs_li ui-corner-top"><?php echo JText::_('Zubehör & Download');?></li>
<li id="hikashop_show_tabular_custom_li" class="hikashop_tabs_li ui-corner-top"><?php echo JText::_('Anwendungsvideo');?></li>              
          
<!-- VOTE TAB TITLE -->
<?php if(in_array($status_vote, array('comment', 'two', 'both'))) {
		if(empty($selected)) $selected = 'hikashop_show_tabular_comment';
		if($comments_count != 0) { ?>
			<li id="hikashop_show_tabular_comment_li" class="hikashop_tabs_li ui-corner-top"><?php echo JText::_('PRODUCT_COMMENT');?><?php if($comments_count>0) echo ' ('.$comments_count.')'; ?></li>
<?php } ?>
			<li id="hikashop_show_tabular_new_comment_li" class="hikashop_tabs_li ui-corner-top"><?php echo JText::_('PRODUCT_NEW_COMMENT');?></li>
<?php } ?>
<!-- EO VOTE TAB TITLE -->
		</ul>
<!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Content download & video -->
      <?php
				echo $this->element->download;
		?>    
		<?php
				echo $this->element->video;
		?>      
The selection tabs are displayed, but only one of the new tabs can be clicked at a time. For me it is also unclear where the program should know with the code in this description which content belongs to which tab.

Greetings from Christian

Last edit: 2 years 10 months ago by chli.

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

  • Posts: 83402
  • Thank you received: 13495
  • MODERATOR
2 years 10 months ago #341122

Hi,

You didn't follow all the instructions there.

It says:

In the < ul class="hikashop_tabs_ul"> element. Then add a div with content after the "ul" thanks to:

<div class="hikashop_tabs_content" id="hikashop_show_tabular_custom">
<!-- Your div content -->
</div>

However, you didn't add that div after the ul.
You need to put your "echo $this->element->download;" inside that div as explained in the documentation I gave.

Also, if you look at the id of that div and the id of the li, you can see that both start with hikashop_show_tabular_custom
And if you check the id of the div and the id of the li for the description, you can see that both start with hikashop_show_tabular_description
So basically, each title/content combination must have an id starting with hikashop_show_tabular_ plus a word specific to the tab.
That's how the system knows which content is linked to which title.
It also means that if you add several tabs, you can't use the same id but different ones for each tab.
For example, instead of:
<li id="hikashop_show_tabular_custom_li" class="hikashop_tabs_li ui-corner-top"><?php echo JText::_('Zubehör & Download');?></li>
<li id="hikashop_show_tabular_custom_li" class="hikashop_tabs_li ui-corner-top"><?php echo JText::_('Anwendungsvideo');?></li>
you should have:
<li id="hikashop_show_tabular_custom_li" class="hikashop_tabs_li ui-corner-top"><?php echo JText::_('Zubehör & Download');?></li>
<li id="hikashop_show_tabular_custom2_li" class="hikashop_tabs_li ui-corner-top"><?php echo JText::_('Anwendungsvideo');?></li>

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

  • Posts: 102
  • Thank you received: 12
  • Hikashop Business
2 years 10 months ago #341194

Hello Nicolas,

Thank you for your reply. Sorry, I must have messed something up here.

I've implemented it now and it works.

I have still one question:
What else do you have to add that the tab is only displayed if the stored field has also been filled.
In my example, we don't have videos for all products.
Then it would be an advantage if the video tab is not displayed at all in the product without a video.

Greetings from Christian

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

  • Posts: 83402
  • Thank you received: 13495
  • MODERATOR
2 years 10 months ago #341195

Hi,

Well, you need a simple condition around the code.
For example, instead of:

<li id="hikashop_show_tabular_custom_li" class="hikashop_tabs_li ui-corner-top"><?php echo JText::_('Zubehör & Download');?></li>
<?php if(!empty($this->element->download)) { ?>
<li id="hikashop_show_tabular_custom_li" class="hikashop_tabs_li ui-corner-top"><?php echo JText::_('Zubehör & Download');?></li>
<?php } ?>

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

  • Posts: 102
  • Thank you received: 12
  • Hikashop Business
2 years 10 months ago #341214

Great, thank you very much for the patient and quick help. I think now this area is how we will implement it in the long run.

The following user(s) said Thank You: nicolas

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

Time to create page: 0.069 seconds
Powered by Kunena Forum