× Got a CSS, HTML or webdesign question? Ask it here!

"2+ Item" Fix?

1 year 2 months ago #16988 by JimUMFan
Does anyone have a way to make the shopping cart use the word "Items" instead of "Item" When there are 0 or 2+ items in the cart?



My guess is that I'll need to use a regular expression of some sort.

Please Log in or Create an account to join the conversation.

1 year 2 months ago - 1 year 2 months ago #16989 by JimUMFan
I found a very simple "half-way" fix. If you add the following CSS to your site:

#cart_count:after {
content: "s";
}

The cart quantity will read "items" regardless of the number of products in the cart. It's a little odd if you only have 1 item, but fixes the issue for 0 and 2+ items.



I'll follow up if I find a definitive fix for this before someone else who has one responds.

Please Log in or Create an account to join the conversation.

1 year 2 months ago #16990 by ccruz
Hey Jim,

Would us changing this string from "item" to "item(s)" be a workable solution for you? I think this way it can apply in any case. Let us know your thoughts.

-Cris

Please Log in or Create an account to join the conversation.

1 year 2 months ago #16993 by JimUMFan
That would be great. It would probably make some users with less HTML/CSS capability happy.

Although, I might be the only grammar stickler who was mildly bothered by this :silly:

Please Log in or Create an account to join the conversation.

Time to create page: 0.110 seconds
Powered by Kunena Forum