I have the following in my mini cart: <div class="items"><span class="num">{{{**ITEM**}}}</span> Items in the Cart</div> Code (markup): I used to use in OSCommerce a part which would change the wording - this code is below: <?php $cart_item_count = $cart->count_contents(); if($cart_item_count == 1) { $itemdesc = 'Item'; } else { $itemdesc = 'Items'; };?> Code (markup): How can I get this to work with my current code? The part {{{**ITEM**}}} will display numbers correctly, like 0,1,2,3 etc - so I thought somehow I could use that as the base, if item <2 show Item if >1 show items Thoughts please.
You may could use this if the template allows execution of php code <div class="items"><span class="num">{{{**ITEM**}}}</span> Item<?php echo intval('{{{**ITEM**}}}')>1?'s':''?> in the Cart</div> PHP: or if your script is somehow dumb <?php $nItems = intval('{{{**ITEM**}}}');?> <div class="items"><span class="num"><?php echo $nItems?></span> Item<?php echo $nItems>1?'s':''?> in the Cart</div> PHP: If that fails, just use javascript on a similar way.