Tabbed Product Display alter default tab

  • Posts: 96
  • Thank you received: 4
  • Hikashop Business
10 years 11 months ago #174650

-- HikaShop version -- : 2.3.3
-- Joomla version -- : 3.3.4

I am using tabbed display for products but need to have the 'Specifications' Tab open and displayed by default, instead of the 'Description'. Also would like to swap the tab positions if possible. All the product details are contained in custom fields rather than in the general description area which is only used for additional information in some cases, so for the current shop I am building the Specifications Tab is more important.

Can you please help me to achieve this.

Thanks

Chris

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

  • Posts: 12953
  • Thank you received: 1778
10 years 11 months ago #174662

Hello Chris,
The solution will be to directly edit the code of the "show_tabular" file of the "product" view of your front-end template via "Hikashop->Display->Views".
Also, if you still need some help, can you show us what do you exactly want to do through some screenshots ?

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

  • Posts: 96
  • Thank you received: 4
  • Hikashop Business
10 years 11 months ago #174790

Hi Mohamed,

I already played around with the view and while I could reverse the tab positions I could not see how to recode to change which tab is open by default. What I really need is help with the code changes required in the show_tabular file.

I have attached a some screenshots - Capture.jpg shows the default view when you navigate to a product - i.e. Picture above and tabs below with the Description Tab OPEN - you will see there is no content in the description.

Capture2.jpg shows the view when you click to open the Specifications Tab - you will see all the product details are contained here.

What I want to do is have the Specifications view to be the default - i.e OPEN when you navigate to the product page instead of the Description. Also would like to change the position of the two tabs so that the Specifications Tab is on the left and Descriptions Tab next - see Capture3.jpg as an example.

Thanks for the help.

Chris

Attachments:

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

  • Posts: 13201
  • Thank you received: 2322
10 years 11 months ago #174813

Hi,

To have the specification tab opened by default, you have to edit in the view "product / show_tabular" the line:

<input type="hidden" name="selected_tab" id="selected_tab" value="hikashop_show_tabular_description"/>
<!-- INTO -->
<input type="hidden" name="selected_tab" id="selected_tab" value="hikashop_show_tabular_specification"/>
And to put the specification tab on the left side, just replace:
			<li id="hikashop_show_tabular_description_li" class="hikashop_tabs_li ui-corner-top"><a onclick="displayTab('hikashop_show_tabular_description');" href="javascript:void(0);"><?php echo JText::_('PRODUCT_DESCRIPTION');?></a></li>
			<?php if($hide_specs == 0){ ?>
			<li id="hikashop_show_tabular_specification_li" class="hikashop_tabs_li ui-corner-top"><a onclick="displayTab('hikashop_show_tabular_specification');" href="javascript:void(0);"><?php echo JText::_('SPECIFICATIONS');?></a></li>
			<?php }
By:
			<?php if($hide_specs == 0){ ?>
			<li id="hikashop_show_tabular_specification_li" class="hikashop_tabs_li ui-corner-top"><a onclick="displayTab('hikashop_show_tabular_specification');" href="javascript:void(0);"><?php echo JText::_('SPECIFICATIONS');?></a></li>
			<?php } ?>
			<li id="hikashop_show_tabular_description_li" class="hikashop_tabs_li ui-corner-top"><a onclick="displayTab('hikashop_show_tabular_description');" href="javascript:void(0);"><?php echo JText::_('PRODUCT_DESCRIPTION');?></a></li>
<?php

The following user(s) said Thank You: chris711

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

  • Posts: 96
  • Thank you received: 4
  • Hikashop Business
10 years 11 months ago #174972

Thanks, that works perfectly!

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

Time to create page: 0.149 seconds
Powered by Kunena Forum