Shape 5

Joomla Templates => eTensity - May 08 - Club => : panstrong November 26, 2008, 04:31:23 AM



: remove the tab Customer Reviews
: panstrong November 26, 2008, 04:31:23 AM
I don't want to use the tab "Customer Reviews" in product detail view. I turned off the "Customer Review/Rating System" in VirtueMart global configuration, but then there is an empty tab. How can I remove that tab?


: Re: remove the tab Customer Reviews
: jonahh December 01, 2008, 12:55:24 PM
Hello,

You can edit the code in flypage.tpl.php and remove this tab there.  The flypage.tpl.php file is located at:

components/com_virtuemart/themes/default/templates/product_details



:
		<div id="tab_s5_a_ts_tab2" onclick="tab_s5_ts_tab2()" style="cursor:pointer; float:left; height:20px;margin-right:6px; padding-top:4px; padding-bottom:3px;padding-left:13px; padding-right:12px; border-top:solid 1px #5D5C5C;border-left:solid 1px #5D5C5C; border-right:solid 1px #5D5C5C; background:#333333 url(components/com_virtuemart/themes/default/images/toprepeat_off.gif) repeat-x;">	
<a id="s5_a_ts1" style="color:#FFFFFF;font-size: 12px; font-weight: bold; cursor: pointer;" onclick="tab_s5_ts_tab2()">Customer Reviews</a>
</div>

Regards,


: Re: remove the tab Customer Reviews
: jingli January 05, 2009, 08:47:00 AM

Did not get this to work any way I tried to modify the flypage.tpl.php file. If I got the 'Customer Reviews' to disappear, the other tabs stopped working; clicking on one of them made all black and it was impossible to go back to e.g. 'Related Products' the tab just remained black and did not show any information anymore.

Instead I added the following code at the very bottom of the s5_tabshow.js file (>components>com_virtuemart>themes>default>templates>product_details>s5_tabshow.js):
:
document.getElementById("tab_s5_a_ts_tab2").style.display = "none";


... so it would look like this:
:
var s5_tab5_length = document.getElementById("tab_s5_div_ts5").innerHTML;
if(s5_tab5_length.length <= 30) {
document.getElementById("tab_s5_a_ts_tab5").style.display = "none";
}

document.getElementById("tab_s5_a_ts_tab2").style.display = "none";

This removed the 'Customer Reviews' tab.


BUT, it would have been better  to link it to the parameter 'Enable Customer Review/Rating System' in the global config of VirtueMart. I could not find how to do this, should be quite easy I think, as the other tabs are content dependent.

Any suggestions?
 :)