- Posts: 214
- Thank you received: 1
No Results Page for Search Filter
I'm using the Hikashop filter module, but I've got one small issue. If I do a search and there are no products found, it just takes me to a blank page.
For example, if you use my site www.craftkeg.com/ and tick EcoKeg and do the search it'll go to hikashop-menu-for-products-listing/product/listing which is not very helpful as it's blank, a customer might think the search is broken.
Is there a way to edit this page to insert some text to say "No products found, try again", or is there another way of handling search results?
Regards,
Matthew
Please Log in or Create an account to join the conversation.
You probably can edit the view "product / listing_div" via the menu display > views and if "$this->rows" is empty display your message.
Please Log in or Create an account to join the conversation.
I'm looking at the view and I can see all the PHP code, but I'm afraid I know it enough to understand some of it, but not nearly enough to write my own!
Could you give me a clue on what the PHP code would look like if I wanted to add a 'No Results Found' found message if "$this->rows" is empty?
Please Log in or Create an account to join the conversation.
- Posts: 12953
- Thank you received: 1778
Please Log in or Create an account to join the conversation.
That did the trick, however it displays the message twice. Is there a certain place I put the code or is there another reason that is happening?
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
The easiest way seems to be to change the code given by Mohamed by this one:
Please Log in or Create an account to join the conversation.
I've actually got something else to ask that I'm struggling with.
Under show_deafult view I'm using the following code to show the products brand (which I'm calling 'container') on a product page, like so www.craftkeg.com/index.php/hikashop-menu...ng/product/263-mocha
<p><strong>Container: </strong><?php $class = hikashop_get('class.category');
$manufacturer = $class->get($this->element->product_manufacturer_id);
echo $manufacturer->category_name; ?></p>
<span id="hikashop_product_price_main" class="hikashop_product_price_main">
If I wanted to add the brand to a product listing page ( www.craftkeg.com/index.php/hikashop-menu...ting/product/listing ) would I be able to use that same code into a different view to get the 'brand' displaying on this page as well?
Please Log in or Create an account to join the conversation.
The view to edit is probably "product / listing_img_title".
Please Log in or Create an account to join the conversation.
- Posts: 37
- Thank you received: 1
I have added this code to.. and it worked.
If have two questions about this :
- Can i add an image ?
- Can i show random products below these row ?
Thank you very much !
Kind regards,
Danny Kunst
Please Log in or Create an account to join the conversation.
Sure.
1. Instead of :
2. You can create a module of the type "HikaShop content module" via the Joomla modules manager, and then use the extension "modules anywhere" to add the tag of the display of the module :
extensions.joomla.org/extension/modules-anywhere
Please Log in or Create an account to join the conversation.
thx
Miles
Please Log in or Create an account to join the conversation.
Yes. However, you don't need any code modification anymore.
You can now simply add a translation override like that:
HIKASHOP_NO_RESULT="No results found"
www.hikashop.com/download/languages.html#modify
Please Log in or Create an account to join the conversation.
Thanks Nicolas
Please Log in or Create an account to join the conversation.