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)
-   -   Conditional hiding of a language label in product.tpl (https://forum.x-cart.com/showthread.php?t=44351)

boswell 12-20-2008 03:36 PM

Conditional hiding of a language label in product.tpl
 
I need to hide the quantity label {$lng.lbl_quantity} in my product.tpl IF the product in question is in a specific category.

Default code in product.tpl is:
Code:

<tr>
<td height="25" width="30%">
{$lng.lbl_quantity}
{if $product.min_amount gt 1}<br />
<font class="ProductDetailsTitle">{$lng.txt_need_min_amount|substitute:"items":$product.min_amount}
</font>
{/if}
</td>



But i'm confused on x-cart syntax and how to make:
Code:

{if $product.categoryid eq '532'}
HIDE QUANTITY LABEL
{else}
DISPLAY QUANTITY LABEL AS USUAL
{/if}


Could someone help flesh out the necessary code? Thanks

JWait 12-22-2008 04:35 AM

Re: Conditional hiding of a language label in product.tpl
 
Have you tried this?
Code:

<tr>
<td height="25" width="30%">
{if $product.categoryid ne '532'}
{$lng.lbl_quantity}
{/if}
{if $product.min_amount gt 1}<br />
<font class="ProductDetailsTitle">{$lng.txt_need_min_amount|substitute:"items":$product.min_amount}
</font>
{/if}
</td>



All times are GMT -8. The time now is 07:27 PM.

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