Skip to main content

The NO_RESULT does not appear

More
9 years 5 months ago #269422 by eduardkoks
-- HikaShop version -- : 3.0.1

Hello, I'm making use of your filter module to do a search on my products. However when I do a search without results , the NO_RESULTS won't display. Just get an empty page....
What's wrong ?

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

More
9 years 5 months ago #269481 by Jerome
Hello,

Which "NO_RESULTS" are you talking about exactly ?
I'm sorry but there is no such translation in HikaShop.

Regards,

Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

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

More
9 years 5 months ago #269494 by eduardkoks
I'm talking about HIKASHOP_NO_RESULTS.
However, when I looked in the languange com_hikashop.ini, I can see this string, but it is empty :
HIKASHOP_NO_RESULT=" "
I've filled in a value in the language override file, now I'm getting the message.

Why is this an empty string in the language files ?

Another question, regarding almost same issue: when I click on a category in my category menu with any products in this category, the category image is displayed followed by just empty space. How can I force to display a message ' No products found in this categroy' when the category is empty ?


best regards,
Eduard Koks

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

More
9 years 5 months ago #269512 by nicolas
Hi,

It is empty by default because often people don't want a message.

If you want to display a message when no products are found on a category, you can change the line:
Code:
} elseif(( !$this->module || JRequest::getVar('hikashop_front_end_main',0) ) && ((@$_REQUEST['ctrl']=='product' || @$_REQUEST['view']=='product') || (@$_REQUEST['ctrl']=='category' || @$_REQUEST['view']=='category')) && (@$_REQUEST['task']=='listing' || @$_REQUEST['layout']=='listing') && !empty($this->filters) && count($this->filters) && !empty($this->filter_set)){
to:
Code:
} elseif(( !$this->module || JRequest::getVar('hikashop_front_end_main',0) ) && ((@$_REQUEST['ctrl']=='product' || @$_REQUEST['view']=='product') || (@$_REQUEST['ctrl']=='category' || @$_REQUEST['view']=='category')) && (@$_REQUEST['task']=='listing' || @$_REQUEST['layout']=='listing')){
in the file "listing" of the view "product" via the menu Display>Views.

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

More
9 years 2 months ago #277257 by flexsus
Hi
I have added HIKASHOP_NO_RESULT="No products found." to my Danish language file and changed the code as described in my listing view. But I still don't get the message when I click on a menu item showing some category with no products in it. The only thing I get in my main body content area is:
Code:
<div class="hikashop_submodules" style="clear:both"> </div>
So I think I must be missing something else?

Regards,
Henrik

.ninja { color: black; visibility: hidden; }
In case of fire:
1. git commit
2. git push
3. exit building

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

More
9 years 2 months ago #277298 by Jerome
Hello,

Did you applied the Nicolas patch as well ?

Regards,

Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

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

More
9 years 2 months ago #277306 by flexsus
Yes I did, but I'm also on 3.1.1?

.ninja { color: black; visibility: hidden; }
In case of fire:
1. git commit
2. git push
3. exit building

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

More
9 years 1 month ago #277532 by Jerome
Hello,

For what I can see, the content is still the same in HikaShop 3.2.0 ; so the patch would be required.
But, the patch that Nicolas gave was for a specific case and I'm not sure that you have the exact same case, so maybe that's why even if you applied the patch (and have the translation set) you do not have the "no result" displayed.

Where exactly do you want to display that content ?
In which context ?

Regards,

Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

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

More
9 years 1 month ago - 9 years 1 month ago #277548 by flexsus
Hi Jerome

In my site I have the "Hikashop >> Products listing" items. Menu item id 785 has products, 786 do not have products ([mysite].dk/fisk).
So if no vendors has added products to a specific category and it's empty, I would like to show the user a nice page saying "No products found".

I just found out, if I put a "Hikashop Content Module" in my template mainbody_bottom position, then this string is shown. But right now I don't use this in my site. Unfortunally I can only see this module in my local, not on my site?! So it might be a combination of two issues.

But if the module worked in my site, can't this be shown if menu item "Products listing" is empty?

Regards,
Henrik

.ninja { color: black; visibility: hidden; }
In case of fire:
1. git commit
2. git push
3. exit building
Last edit: 9 years 1 month ago by flexsus.

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

More
9 years 1 month ago #277592 by nicolas
Hi,

Your problem is definitely different than the problem in this thread.
The patch I provided, which cannot be included in HikaShop as it would create problems in other cases, is only for menu items of the type "categories listing".
Since you're using a products listing menu item, your problem is different.

And note that it's normal that the error message doesn't appear when you create a menu item with no products to be displayed.
The HIKASHOP_NO_RESULT message will display when you use a filter and the system doesn't find any product.

So in your case, you would have to change that code to:
Code:
} elseif(( !$this->module || hikaInput::get()->getVar('hikashop_front_end_main',0) ) && ((@$_REQUEST['ctrl']=='product' || @$_REQUEST['view']=='product') || (@$_REQUEST['ctrl']=='category' || @$_REQUEST['view']=='category')) && (@$_REQUEST['task']=='listing' || @$_REQUEST['layout']=='listing')){
But again, that's not something we can have by default in HikaShop as it would make the message display in cases where you don't want it.

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

More
9 years 1 month ago - 9 years 1 month ago #277921 by flexsus
Hi Nicolas

Thank you for making a solution. Unfortunately it does not work for me.
I will consider, if I have menu items with no products from my vendors, then I might not need it and unpublish it. Also if I only have 1-2 product in a category I might force vendors to select other category.

Regards,
Henrik

.ninja { color: black; visibility: hidden; }
In case of fire:
1. git commit
2. git push
3. exit building
Last edit: 9 years 1 month ago by flexsus.

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

More
9 years 1 month ago #278022 by Jerome
Hello,

Where exactly do you want to display that content ?
In which context ?

I'm sorry but, even if we know your website domain, we can't access it so we can't see what that menu.
It's useless for you and for us to be blind and give you elements which are not in your context.
Nicolas made a guess but, it looks like he guess wrong since you do not have that you're describing.

I asked for knowledge to answer you correctly ; I'm afraid that we do not have that knowledge.
So I'm sorry, we can't help you.

Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

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

More
9 years 1 month ago #278229 by flexsus
Hi Jerome

Sorry, of course you cannot work in blind. But unfortunately my website is not yet ready for public, I hope it will be soon. I thought you had the username and password, both for my site and for the SuperUser account in Joomla backend. I can resend it by contact form, if you need it.

Anyways, as said I will consider, if I have menu items with no products from my vendors, then I might not need it and unpublish it.
(mysite.dk/fisk)

Best Regards,

Henrik

PS. I still consider Hikshop and Hikamarket the best e-commerce solution for Joomla and your technical support is more than fantastic!

.ninja { color: black; visibility: hidden; }
In case of fire:
1. git commit
2. git push
3. exit building

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

More
9 years 1 month ago #278232 by Jerome
Hi,

Still making speculation ; but if you're using a Joomla menu you might not have any content in the $_REQUEST variable regarding the controller and the layout. Thus it would explain why the code cannot work.
As you know, it would require more concret details to be sure and understand the working context.

Otherwise yes, you can see to unpublish the menu that are pointing to empty listing.

Regards,

Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

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

Time to create page: 0.115 seconds
Powered by Kunena Forum