Need to add Custom Tabs before importing

  • Posts: 26
  • Thank you received: 0
11 years 3 months ago #158344

Hello Nicolas,
I am almost finished. I have a problem with a Related Products content module.
When you go to the Products Page, the module displays the related products correctly under the content of the product page,
but once you click on any one of the related products, it redirects you to a 404 error page instead of to the products page of the related product.

Please use the following link to click on a related product, so you can see yourself what is wrong.

www.lightspeed-security-sanantonio.com/i...angle-clock-quad-lcd

Thank you very much,

Rudy

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

  • Posts: 12953
  • Thank you received: 1778
11 years 3 months ago #158380

Hello Rudy,
The solution will be to :
- Go to your related products content module configuration page
- Set the "menu" option to one of your product listing content menu

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

  • Posts: 112
  • Thank you received: 3
10 years 4 months ago #200528

I need to add a custom tab on the product detail page that uses the data from a custom product field. Based on Xavier's instructions on this forum, I have added the custom tab. Thanks for that info. But, how do I link it to the custom field. Right now, the data from all custom fields are displayed in the "Specifications" tab. I want one of the custom fields to display in the custom tab.

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

  • Posts: 84323
  • Thank you received: 13715
  • MODERATOR
10 years 4 months ago #200558

Hi,

In that case, turn off the "frontend" display setting of the field, and add such code:

<?php echo $this->element->column; ?>
where "column" is to be replaced by the column name of your custom field, in the content of your custom tab.

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

  • Posts: 112
  • Thank you received: 3
10 years 4 months ago #200588

Nicolas, works nearly perfect except that I have the "Comments" tabs turned on. When I select the Custom Tab, the Comments tabs do not display. When I select any of the other tabs, the comments sections display properly. I am sure I have done something wrong with the code. But, if you can help me fix it, it is much appreciated This is the code for the custom tab named "faq" and the code that follows it for the Comments:

<li id="hikashop_show_tabular_custom1_li" class="hikashop_tabs_li ui-corner-top"><a onclick="displayTab('hikashop_show_tabular_custom1');" href="javascript:void(0);">Common Questions</a></li>
<div class="hikashop_tabs_content" id="hikashop_show_tabular_custom1">
<?php echo $this->element->faq; ?>
</div> 
			<?php }
			if($status_vote == "comment" || $status_vote == "two" || $status_vote == "both" ){
			?>
			<li id="hikashop_show_tabular_comment_li" class="hikashop_tabs_li ui-corner-top"><a onclick="displayTab('hikashop_show_tabular_comment');" href="javascript:void(0);"><?php echo JText::_('PRODUCT_COMMENT');?></a></li>
			<li id="hikashop_show_tabular_new_comment_li" class="hikashop_tabs_li ui-corner-top"><a onclick="displayTab('hikashop_show_tabular_new_comment');" href="javascript:void(0);"><?php echo JText::_('PRODUCT_NEW_COMMENT');?></a></li>
			<?php } ?>
		</ul>

Last edit: 10 years 4 months ago by tbroderick.

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

  • Posts: 112
  • Thank you received: 3
10 years 4 months ago #200601

Nicolas,

I figured it out. The Tab and the contents are in two different parts of the file. That was not explained very well for an amateur in PHP like me. But, it is working now.

Much thanks.

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

  • Posts: 112
  • Thank you received: 3
10 years 4 months ago #200605

Adding custom tabs is simple once you know how to do it. Creating the tab is done on roughly line 226 right after this code:

<li id="hikashop_show_tabular_comment_li" class="hikashop_tabs_li ui-corner-top"><a onclick="displayTab('hikashop_show_tabular_comment');" href="javascript:void(0);"><?php echo JText::_('PRODUCT_COMMENT');?></a></li>

Creating the content for the first custom tab is placed at line 258 right after this code:

<div class="hikashop_tabs_content" id="hikashop_show_tabular_specification">
<?php
$this->setLayout('show_block_dimensions');
echo $this->loadTemplate();
if(!empty($this->fields)){
$this->setLayout('show_block_custom_main');
echo $this->loadTemplate();
}
?>
</div>

Hopefully, this helps other rookies like me to add custom tabs. There is more to the actual process because you have to create a custom field if you want to have specific info in the custom tab's content area. But, HS gives you a ton of possibilities like images, radio buttons, checkboxes, text areas, etc. Hockshop is an amazing product with as many capabilities as a person can think of.

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

Time to create page: 0.086 seconds
Powered by Kunena Forum