X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Category names (https://forum.x-cart.com/showthread.php?t=8312)

roadkill 06-30-2004 08:53 PM

Category names
 
On the add or modify products section, it shows the area for 4 product categories, the first being Main Category, then Category #1, Category #2, etc.

Is there a way to change the labeling for that? This has been driving me nuts, as I have looked (I thought) through all the applicable templates without finding where this labeling comes from.

I would love to be able to change these labels, even though they all pull from the same category database (which I don't like, but not much can be done about that) So rather than have "Category #1", it can read something else like "Manufacturer" or something.

Thanks for any help you can provide. You guys all know this much better than I

jeremye 07-02-2004 11:24 AM

Take a look at /skin1/main/product_modify.tpl, lines 74-106 (in my version of the file). The code displays those labels as follows:

Code:

<tr>
  <td class=ProductDetails>{$lng.lbl_main_category}</td>
  <td class=ProductDetails>
    <select name="categoryid">
{section name=cat_num loop=$allcategories}
<option value="{$allcategories[cat_num].categoryid}" {if $allcategories[cat_num].categoryid eq $product.categoryid}selected{/if}>{ $allcategories[cat_num].category }</option>
{/section}
    </select>
{if $fillerror ne "" and $product.categoryid eq ""}<font class=Star>&lt;&lt;</font>{/if}
  </td>
</tr>
<TR>
 <TD class=ProductDetails>{$lng.lbl_category} #1</TD>
 <TD class=ProductDetails>
  <SELECT name="categoryid1">
  <OPTION value=0 {if $product.categoryid1 eq "0"}selected{/if}>{$lng.lbl_undefined}</OPTION>
{section name=cat_num loop=$allcategories}
<option value="{$allcategories[cat_num].categoryid}" {if $allcategories[cat_num].categoryid eq $product.categoryid1}selected{/if}>{ $allcategories[cat_num].category }</option>
{/section}
  </SELECT></TD>
</TR>
<TR>
 <TD class=ProductDetails>{$lng.lbl_category} #2</TD>
 <TD class=ProductDetails>

  <SELECT name="categoryid2">
  <OPTION value=0 {if $product.categoryid2 eq "0"}selected{/if}>{$lng.lbl_undefined}</OPTION>
{section name=cat_num loop=$allcategories}
<OPTION value="{$allcategories[cat_num].categoryid}" {if $allcategories[cat_num].categoryid eq $product.categoryid2}selected{/if}>{ $allcategories[cat_num].category }</OPTION>
{/section}
  </SELECT></TD>
</TR>
<TR>
 <TD class=ProductDetails>{$lng.lbl_category} #3</TD>
...


Just remove the "{$lng.lbl_category} #X" part and replace it with whatever you want.

HTH

Jeremy


All times are GMT -8. The time now is 02:18 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.