Search module help and listing display query.

  • Posts: 40
  • Thank you received: 1
11 years 10 months ago #83033

Hi,

1. I have been trying to set up a product search module, using filters, to display a product list based on selected criteria - we bought the business version of HikaShop for this specific reason. I want to include (a). A keyword search (text field) to filter through product descriptions and custom fields, (b). Seven check box options (decades, 1940's through to 2000's - ie. picking one option from the seven displayed), plus (c). A drop-down menu with a further thirty one options to select from, acting on one custom field, "Genre". The search functions should work individually or together, initiated by a 'Start search' button.





I set up the filters and added them to the Hika filter module, only to find that there is no layout to the module structure, so the components took a row each and the resulting page stretched off into cyberspace. I unpublished all but a couple of the filters - but when they opened on the page, the check box option displayed only the title of a check box filter (- ie. no check box!), and what looked like a truncated scroll bar with the legend "all" for the drop-down lists. The keyword text field displays but does not function at all, neither does the "Genre" search.



Also, when the filters are enabled, they appear on EVERY product list (above), between the intro text and the list items. Since the site is live, all this is a bit problematic. I had hoped to set up a 'secret' page to sort out the layout before publishing the final version, but that is not a possibility while the filters display on all listing modules. Is this caused by selecting the main product category and selecting the 'all sub-categories' option when setting up?

There is now also a recurrence of the message 'Sorry, no products corresponding to your search were found.' below the category list product displays.



2. I set up a category list from a (sidebar) menu button and initially, the category title links displayed in the category listing did not function, but Hika support helped me to link a new menu item, so now clicking any of the category titles opens the full product listing for that category.



OK so far but, because there was only an image and the category title to be displayed, the menu category module list used smaller display 'boxes' than the standard product lists (below).


So when the full product data was called, it overflowed the smaller layout (again below).


How can I call a listing from the 'smaller' category module and have it display in the original 'larger' module boxes that were set up to fit the full item listing?

3. By default, the product lists display by Title (Name) in alphabetic order. Is it possible for the default product lists to display in alpha-order from a different (custom) field's content?

Any advice would be greatly appreciated, many thanks.

Last edit: 11 years 10 months ago by badcoder.

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

  • Posts: 82796
  • Thank you received: 13357
  • MODERATOR
11 years 10 months ago #83203

Hi,

1. If you don't want that everyone that see the filters, you can restrict them by access level so that only your user group see them. For the layout, in the Display tab of the configuration, you can change the number of columns for filters.
Regarding the error message, I wouldn't be able to say much except that you can easily remove it completely by changing its translation with a translation override:
www.hikashop.com/en/download/languages.html#modify

2. Normally, the height of the box automatically adapts to the inside. You must have some CSS messing with that on your website. Can you give a link to that page ?

3. In each products/categories listing menu/module that you can edit via the menu Display>Content menus/modules, you can select the "ordering column" which can be the already existing "ordering" column or any other field of products/categories including custom fields.

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

  • Posts: 40
  • Thank you received: 1
11 years 10 months ago #84972

It's probably simplest if I go through the above in reverse order:

3. Resolved exactly as described above, thanks.

2. Sub-container box height auto-adjustment resolved by editing front-end CSS, thanks.

1. The error text 'Sorry, no products corresponding to your search were found.' which appeared below the category listing was due to the 'associated module'. The text was not in the language file, but in the front end View product -> listing.php. After updating the file version to 2.0.0 the issue was resolved. But . . .

I am still trying to set up a search module page. I wanted to be able to work on the search page layout so, because the site is now active, I set up an article page, from a hidden link, with a 'loadposition' so that the module could be published and viewed. So far so good.

Updating the 'Views' files to v2.0.0 allows setting 'Display Filters' to 'No' to work, and now the filters module displays on the 'loadposition' page only. But the filters still do not work. The page displays as below with no discernible layout, and all the components are inactive:



1. The keyword search field is inactive - doesn't search.
2. The 'decades' check box titles appear, but with no checkboxes!
3. The drop down list subjects appear as titles outside separate drop-down lists rather than as search subjects within a single drop-down.

I want the module to display as shown below. There are parameters put in place from the filter set up page (eg. height), but the help page is incomplete and simply mentions there may be other options available for some filters. There does seem to be some inline CSS in operation, but where is it applied?



Also, where is the help please for setting up single and multiple drop-down lists - they don't seem to function whichever way I set them up.



When set to apply on custom fields, the titles of the custom fields are available for selection - but what is the function of the 'Values' fields - whatever values I have put in these fields disappears after clicking 'Save'. And to what does the option 'Defined limits' refer?

I think there is a fault in the filters setup on the site, but any advice would be welcomed, thank you.

Attachments:
Last edit: 11 years 10 months ago by badcoder. Reason: type error

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

  • Posts: 82796
  • Thank you received: 13357
  • MODERATOR
11 years 10 months ago #85203

Hi,

There are indeed issues with the way you setup your fields/filters which is why your filters don't work properly.
As you didn't provide screenshots of all the options of all your filters/fields, I can only guess and I might be off or not solve the issues completely, however I already see two problems from the information you provided:

1. First, I see that you created one custom field for each date and then one filter for each field. That's not the way to do it. You should have one custom field with all the possible values in it and attach that custom field to one checkbox filter which will display all the choices as checkboxes.

2. I think that you have turned on the "Dynamic display" option of your filters. Because of that, it will only display the values of the currently displayed products. So if you don't have any products displayed by default on that page, it won't give any values. You should turn off that option in your filters.

The Defined limits option allows you to add superior than and inferior than choices for prices or custom fields with integer values so you can keep it off as you don't need it.

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

  • Posts: 40
  • Thank you received: 1
11 years 9 months ago #85678

Hi,

Thanks for your help so far with this, I have deleted all of my earlier efforts and started again, this time with three filters: 1. 'Search Term/Phrase' which is intended to be a text search acting on eleven fields in the product page. They are - 'product_artist_name, product_b_side, product_catalog_no, product_description, product_genre, product_keywords, product_label, product_meta_description, product_name, product_title, product_track_list'
2. 'Genres' which is a drop-down list intended to act on the 'product_genre' custom field.
3. 'Decade' which is a series of check boxes intended to act on the 'product_decade' custom field.



I assume that they will work independently or in combination, being initiated by a single 'Start search' button.

They all seem to appear correctly on the front-end, but do not function, and I cannot see how to link the 'Start search' button to have the search results display as an 'ad hoc' product category list. The search module opens in an article page via 'loadposition' (below), and is presently linked to a menu item in the 'hidden menu'. The final intention is to call up the page from a menu button in the site's navigation sidebar.



I have attached images of the back-end components. Can you please explain how to get the Search button to activate the search? The search module itself is in the Joomla module listing but does not appear in the HikaShop module list.

Many thanks.

Last edit: 11 years 9 months ago by badcoder.

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

  • Posts: 82796
  • Thank you received: 13357
  • MODERATOR
11 years 9 months ago #85736

That's way better now :)
Your fields and filters are now configured properly.

If that doesn't work, I think that it comes from the way you setup the filters module.
Could you give a link to that page so that we can look at the HTML/JS of the page and see what's going on ?
I suppose that it has something to do with the menu that you entered in the options of the module. It's however hard to be a precise solution without seeing what is going on on that page.

Last edit: 11 years 9 months ago by nicolas.

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

  • Posts: 40
  • Thank you received: 1
11 years 9 months ago #86068

I have the search module functioning and displaying results, thank you, now just a couple of things to 'finish the job'!

1. Can you tell me how to put a title/heading of 'Search results' on, well, the search results page! At the moment, either nothing displays (can't find where to input the title), or the title 'Product Categories' appears, which seems to be coming from the category listing menu page. The search module resides in Joomla, outside of the Hika system structure, and so doesn't appear to have a Hika counterpart.

2. Can you tell me how to get the filters to reset after a search has completed. At the moment, you have to manually cancel the previous settings when returning to the search input page.

3. Can the filters be set to search in conjunction with one another, or do they all operate separately?

Thanks for your help.

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

  • Posts: 82796
  • Thank you received: 13357
  • MODERATOR
11 years 9 months ago #86145

1. You're using filters, not the search module of joomla. So you need to set the title you want in the menu of search result page and make sure that the option "Use menu name instead of category name for the title" is turned on in your menu's options.

2. There is no option for that. It's normal that the search stays unless you remove the filter selection. For example, if you have two pages of results. If you click on the second page, you want to filters to stay selected otherwise, the pagination is basically unusable on the search page.

3. That's how it is already. When you select two filters, the system will display the products matching both filters.

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

  • Posts: 40
  • Thank you received: 1
11 years 9 months ago #86374

OK, I've been back through this again (and again) but I still cannot find the solutions to my problems, so I'll recap my earlier posts. I did not mean to imply that I was referring to the Joomla search module, I AM using the Hika filter module, but it is not found in the Hika modules listing as I expected, but only in the Joomla module listing. It cannot be linked through like other Hika modules to a specific menu, but instead relies on the menu ID being entered on the filter module. OK so far.

1. At the moment the sidebar menu item links to a Joomla article page, which displays the Hika filter module via a 'loadposition' instruction. It's the only way I could see of displaying the necessary input fields for the filters, with the layout set up from edits to the Hika front end CSS file. At this point, the Page Heading is 'Take a look through the stock ' and the Browser Page Title is 'Search the Music', both of which are the Page Display Options for the selected menu item. This is fine and as I want it to be.

I previously had the menu item linked to an 'Associated module' (the Hika default), but this resulted in two search result listings being displayed one above the other, so I deleted it. Should I instead have set the menu item CSS to 'display:none;' and retained the Associated module?

The filters appear to work OK (I've not thoroughly checked them yet). However, I want the results output to be headed 'Search results', but instead I get the heading 'Product categories', which belongs to a separate category listing module and is only entered there. How? The category listing module is completely unrelated to the search function (or is it?).

The filters module has the title 'Stock search' and the title appears on the page, above the search filter input fields. So I cannot find where to change the page heading when the results are displayed. You mention the 'Results page' in your previous post, but where is that set up? Is it the 'Associated module' as I mentioned above?

2. When a search returns no results, I simply get a completely blank page. No page heading (same problem as above?) no default message. Previous to this, the default message (my text) was 'Sorry, no products corresponding to your search were found.' which operated on all product category lists as appropriate. This text was not in the language file, but in the front end View 'product -> listing.php' - see below.

<?php }
$html = ob_get_clean();
if(empty($html)){echo 'Sorry, no products corresponding to your search were found.';}else{ ?>
<div id="<?php echo $this->params->get('main_div_name');?>" class="hikashop_category_information hikashop_products_listing_main">
<?php echo $html; ?>
</div>

Since the latest Hika update, that file has changed and the message has disappeared. Can you tell me where this function is currently positioned so that I can get it working again, perhaps with additional text explaining to the customer what to do to get back to the search page.

3. I would also like to have a standard 'Back' button to position on the empty search results page to take the customer back to the search filter page, and also as a 'Back to listing' button on the product details page, opposite the 'Add to cart' button. Can you please show me how this can be achieved?

Thank you.

Last edit: 11 years 9 months ago by badcoder.

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

  • Posts: 82796
  • Thank you received: 13357
  • MODERATOR
11 years 9 months ago #86543

Hi,

1. You add a products listing menu item with an associated products listing module so you were correct in deleting the associated module. If you had used the default products listing menu item it doesn't have any associated module and is already configured to be used by the filter module.

If the title of the result page is "product categories", it means that in the HikaShop options of your menu item (the one which displays the products where you add the associated module that you deleted), the "Use menu name instead of category name for the title" is turned off and it use automatically the name of the main category of your products. As I said in my previous message, simply turn that on and that will display the menu title instead.
If you can't find it, please give a link to the page and I'l be able to tell you directly the id of the menu item.

2. From what you were saying in point 1, it seems that you are now using a products listing menu item and not a categories listing menu item which would explain why you don't have the message anymore.
In the file listing.php of the view product, there is actually a similar line:
<?php }
$html = ob_get_clean();
if(!empty($html)){ ?>

That you can change to:
<?php }
$html = ob_get_clean();
if(empty($html)){echo 'Sorry, no products corresponding to your search were found.';}else{ ?>

And you should get back your error message.

3. You can edit the file show of the view product and add such code for the product page:
<a href="#" onclick="history.back();return false;">Go back</a>

You can add the same code in the error message of point 2 if you want it in the search result page when there is no product found.

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

Time to create page: 0.124 seconds
Powered by Kunena Forum