View Single Post
  #1  
Old 09-04-2010, 01:38 PM
 
Sisom Sisom is offline
 

eXpert
  
Join Date: Sep 2006
Posts: 310
 

Default Displaying "item" or "items" in minicart

This mod gets rid of the word "item(s)" in the minicart, and instead will put "item" for one item, or "items" for more than one item.
This is for 4.3, but will probably be similar in other versions. You will lose the minicart tooltip by using this method, I expect that can be easily added in by somebody else if they want to.

Edit customer/minicart_total.tlp


and on line 11 (I think, this may be a few lines out as I've moved things about a bit while working on this), delete the following line:
Code:
{$lng.lbl_cart_X_items_total|substitute:x:$minicart_total_items:total:$total}

and insert the following instead:
Code:
{$minicart_total_items} {$lng.lbl_item}{if $minicart_total_items > 1}s{/if} {$total}


That works fine, as long as you don't need the Minicart mouseover tooltip, because

the label 'lbl_cart_X_items_total' is as follows:
Code:
<span class="minicart-items-value">{{x}}</span>&nbsp;<span class="minicart-items-label">item</span>&nbsp;<span class="minicart-items-delim">/</span>&nbsp;<span class="minicart-items-total help-link" onmouseover="javascript: viewTooltip(this, txt_minicart_total_note);">{{total}}</span>


My solution uses the much simpler label 'lbl_item' which is, of course, "item".
__________________
X-Cart Gold Version 4.3.2
Reply With Quote