Jump to content

Remove "Products found matching 'search'." in results?


Kristoff

Recommended Posts

Hi, hopefully this should be straight forward...

 

When doing a search, the category title changes to:

 

" Products found matching 'search'. "
 

However if you do a search and nothing is found you simply get:

 

" Search results "

 

Is there any way of making the title "Search results" all the time as our category titles are a large font size and when the Products found matching 'search'. shows up it goes over 2 lines and ruins the theme.

 

Cheers

Link to comment
Share on other sites

Hi Kristoff

 

There are two things you can do or a mixture of both. 

 

1. You can reduce the font size in the CSS files so that more fits in the line before falling onto the line below.

2. You can edit the skins/{skin in use}/templates/content.category.php to get it to automatically truncate the text. 

 

e.g. Change:

<h2>{$category.cat_name}</h2>

To:

<h2>{$category.cat_name|truncate:30:"&hellip;"}}</h2>

More information here.

 

Hope that helps. 

Link to comment
Share on other sites

Thanks for this Al, however if possible i'd rather the title just be a standard title of " Search results " rather than changing dynamically for each search. There's nothing wrong with the title for any of the other categories, it's only when it adds the extra text and search phrase. From doing test searches and resulting in no items, i'd guess it's probably just a simple if else statement that returns the title as when there are no search results it simply says " Search results " ?

 

EDIT: I have just tried the truncate method and it now has "Products found...", whilst this works, I'd really like this to say "Search results" if possible?

Link to comment
Share on other sites

What skin are you using?

 

For the Kurouto skin, the <h2> block at the top of /templates/content.category.php (seen at the top of the center column of the page) will grow as tall as it needs to be and does not cause problems for the rest of the page.

 

If you want to change what is displayed to a simple "Search Results", you can try using CubeCart's Language phrase editor in admin. The phrase will be in the "catalogue" group, the "notify_product_search" phrase.

 

Currently, in English, it says, "Products found matching '%s'." Change it to "Search Results".

Link to comment
Share on other sites

Glad that worked for you, Kristoff. While this thread is open, however, I've always thought it would be better to show the search terms used in an unsuccessful search as well, so customers can see if they had a typo, etc.

 

Since there's no reply here, I've created a new >thread with this new topic, where a solution has been offered.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...