
Originally Posted by
Reneetje
I searched and searched and found people had the same problem as I have but did not find the solution for this:
In the responsive version when you choose a product there is a DETAILS tab and a DESCRIPTION tab. I want to do the following but don´t know how, if somebody knows, please post the code :)
1-Turn off / hide the DETAILS tab completely
2-Make sure that the DESCRIPTION TAB is always OPEN and/or shows the description without the need of clicking the tab
I think it is an extra thing to do for the customers which we should avoid.
I hope someone can help!
Thank you!
René
1. Assuming that the desire is to hide the details "tab" when there is nothing worth being shown in it, not necessarily just to never ever show it. The following changes made to includes/templates/responsive_sheffield_blue/templates/tpl_product_info_display.php
will hide the details drop down on the product page if there is nothing to be displayed (Ie. clicking on the option would just change the direction of the arrow and no result.)
search for: <!--bof Product details list -->
and replace from <!--bof Product details list --> to <!--eof Product details list --> the details section with the following:
Code:
<!--bof Product details list -->
<?php if ( (($flag_show_product_info_model == 1 and $products_model != '') or ($flag_show_product_info_weight == 1 and $products_weight !=0) or ($flag_show_product_info_quantity == 1) or ($flag_show_product_info_manufacturer == 1 and !empty($manufacturers_name))) ) { ?>
<div class="layer1">
<p class="heading"><?php echo PRODUCT_DETAILS; ?></p>
<div class="content1">
<ul id="productDetailsList" class="floatingBox back">
<?php echo (($flag_show_product_info_model == 1 and $products_model !='') ? '<li>' . TEXT_PRODUCT_MODEL . $products_model . '</li>' : '') . "\n"; ?>
<?php echo (($flag_show_product_info_weight == 1 and $products_weight !=0) ? '<li>' . TEXT_PRODUCT_WEIGHT . $products_weight . TEXT_PRODUCT_WEIGHT_UNIT . '</li>' : '') . "\n"; ?>
<?php echo (($flag_show_product_info_quantity == 1) ? '<li>' . $products_quantity . TEXT_PRODUCT_QUANTITY . '</li>' : '') . "\n"; ?>
<?php echo (($flag_show_product_info_manufacturer == 1 and !empty($manufacturers_name)) ? '<li>' . TEXT_PRODUCT_MANUFACTURER . $manufacturers_name . '</li>' : '') . "\n"; ?>
</ul>
</div>
</div>
<br class="clearBoth" />
<?php
}
?>
<!--eof Product details list -->
Item 2 can be a little more involved as it relates to some java calls and other portions of the code, but really is a relatively simple change.
To have the details default as displayed but still allow changing from displayed to hidden, then in:
includes/template/responsive_sheffield_blue/templates/tpl_product_info_display.php
change the jQuery line in the following from .hide() to .show()
<script type="text/javascript">
$(document).ready(function() {
jQuery(".content1").hide();
//toggle the componenet with class msg_body
jQuery(".heading").click(function()
{
jQuery(this).next(".content1").slideToggle(500);
jQuery(this).toggleClass("minus");
});
});
</script>
So it could be like this:
<script type="text/javascript">
$(document).ready(function() {
jQuery(".content1").show(); //mc12345678 modified from: jQuery(".content1").hide();
//toggle the componenet with class msg_body
jQuery(".heading").click(function()
{
jQuery(this).next(".content1").slideToggle(500);
jQuery(this).toggleClass("minus");
});
});
</script>
Bookmarks