How to change text on product tabs

(Edited: This solution assumes you don’t want to use Languages to change the tab name system wide.)



After posting this on the forum and not coming up with an answer, I contacted CS-Cart support and thought I’d share the results here. They gave me instructions for changing it on the admin side, so I fixed the instructions for updating it on the storefront. This works for 2.0.12.



This example will rename the Files tab…


  1. Log in to your administration panel
  2. Open the “Languages” page (the link to this page is under the “Content” tab)
  3. Click on the “Add language variable” button
  4. Enter the “the_files_tab” phrase (in the lower case only and without quotes) in the “Language variable” field
  5. Enter the new name for the “Files” tab in the “Value” field.
  6. Click on the “Create” button
  7. Open the “tabsbox.tpl” file located in the “skins/your_skin/customer/common_templates” directory of your CS-Cart instalaltion.

    8 ) Replace the following part of code:




<li id="{$key}{$id_suffix}" class="{if $tab.js}cm-js{elseif $tab.ajax}cm-js cm-ajax{/if}{if $key == $active_tab} cm-active{/if}"><a {if $tab.href}href="{$tab.href}"{/if}>{$tab.title}</a></li>
```<br />
<br />
with this one:<br />
<br />
```php
<li id="{$key}{$id_suffix}" class="{if $tab.js}cm-js{elseif $tab.ajax}cm-js cm-ajax{/if}{if $key == $active_tab} cm-active{/if}"><a {if $tab.href}href="{$tab.href}"{/if}>{if $tab.title == "Files"}{$lang.the_files_tab}{else}{$tab.title}{/if}</a></li>
```<br />
<br />
9) Save the file.<br />
<br />
*****<br />
I had to clear the cache to see the changes.  (clear the cache by adding ?cc to the index page of your admin panel - for ex:  index.php?cc)<br />
<br />
You can change more than one tab by creating another language variable and adding an elseif statement... for example<br />
```php
{if $tab.title == "Files"}{$lang.the_files_tab}{elseif $tab.title == "Features"}{$lang.the_features_tab}{else}{$tab.title}{/if}

Thanks! Very useful mod in my opinion.

Thanks, ogia. Nice to finally have this answered.



Bob