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:
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.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 -->
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()
So it could be like this:<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>
<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