Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Displaying "item" or "items" in minicart

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #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
Reply
   X-Cart forums > X-Cart 4 > Dev Questions



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 07:50 AM.

   

 
X-Cart forums © 2001-2020