VM2 Ajax Search Features/Bugs

Please post your questions and problems with any of our extensions which you are using

VM2 Ajax Search Features/Bugs

Postby atrus80 » Mon May 19, 2014 10:03 am

Hi Stan,

Let me summarize all my findings so far with this great module: (we are using it on http://www.quality-tuning.eu and other domains)

1. Use current template css. At the moment we see default VM template, is there any way to use our theme's/template's css?

2. Add another option in Children handling: "Search all products but display ONLY parents and products without children". No children to be displayed, but children to be searchable! Instead the parent of the found child to be shown.

For example:
BL206 (parent)

BL206L (child1)
BL206R (child2)

Customer searches for BL206R but BL206 is shown in the result. This is very useful in many cases.

3. Post Text / Pre Text to use JTEXT strings also. Pre and Post Texts appear before and after search box. Because we use many languages, we'd like these fields in module params to support JTEXT strings.

4. 'No products found' JTEXT to be supported in case there is no match for a search string.

5. Pagination to be supported ideally. Otherwise a 'More products that can be displayed found. Please refine your search' JTEXT to be supported so that the customer knows there are more products in the results.

6. Check http://www.quality-tuning.gr/media/searchstats.txt

This is an export of the stats table. You will notice smth like the following for many searches:
air s,1
air st,1
air sto,1
air stor,1
air storm,1

Apparently, due to Ajax the module cannot understand when an entry is finished. Maybe we should only use Submit button in order to make sure that the customer finished his query? (Maybe a magnifying glass image?)

7. A 'Loading' icon to be added so that the customer knows that a search is in progress, you may check the 'Quick Search' module in the left column of our website: http://www.quality-tuning.eu. For example: Image

8. Caching of correct language results. At the moment it seems there is some issue, more specifically:

e.g. - go to italian language/domain: http://www.quality-tuning.it/
- search for OV-001, check the result, it is in italian language, that's correct.
- now go to uk site http://www.quality-tuning.co.uk/
- search again for OV-001, you will see the result is again in italian. It seems that the italian content is cached and shown in all languages which is not correct. We are using also Rupostel's new cache plugin.

9. Search not working from article pages? For example:


Search seems to not work in the above (and other) article page!

Would appreciate your prompt advice as always :)

Posts: 85
Joined: Mon Feb 06, 2012 6:22 pm

Re: VM2 Ajax Search Features/Bugs

Postby admin » Tue May 27, 2014 12:37 pm

hello chris, let me reply in points:

1. the component section of the module loads the virtuemart category. (even outside com_virtuemart) If the css are not included with your VM's overrided or core themes, you should include them within your category theme file in:
/templates/YOUR J THEME/html/com_virtuemart/category/default.php

use something like:
JHtml::css('template.css', '/templates/your template/css/template.css');

this function will make sure that once the category is loaded, it also loads it's css. There is not much ways how to find out which CSS should be included from a module or a component that loads the virtuemart category view because many themes load them with "if current option is virtuemart, load this and that css" ... but this module/component loads the view on any of the components.

2. I believe this is what the "include only parents products" should do. I'd have to check if the childs are actually searched, but the display is set to only parents with children or normal products without children

3. yes, i need to work on this stuff + JText

4. If there is any message like "no products found" - it comes from your theme, not the module/component itself, pls see the category template file above

5. pagination is a huge problem here because the page loads in ajax context where the loaded content cannot execute any javascript. The default pagination script in VM relies on javascript and thus it would not work.

i've disabled pagination at municak.sk with:

$option = JRequest::getVar('option', 'com_virtuemart');
if ($option == 'com_virtuemart')
// print pagination

The original thought with the validation was that the user should make more specific search to limit the products and secondly to make it faster so that not whole table needed to be searched. I can add the "more products found" or similar, but all of this would double the query time as it would need to do a full table search.

6. This is intentional. The reason is that the results are also shown for partial strings and we want to add a pre-cache logic which will pre-create the results per most commonly searched phrases - even partial.

7. Yes, the loader image should be added

8. Hmm, i'd have to check this up

9. Hmm, it should be as far as the javascript is not broken. I can check this for you. Probably some other part of your system gives a javascript error.

Best Regards,
Site Admin
Posts: 2654
Joined: Wed Jan 06, 2010 11:43 pm

Re: VM2 Ajax Search Features/Bugs

Postby info@.....cz » Mon Jun 02, 2014 8:53 pm

I would like to add one more request - allow generating URLs. Then, I could easily share link for only goods that are "red" or any other properties mentioned in the name/description.
It seems to be very important function for me. And it doesn't have to be SEF (that would be way too slow).

However, I like all the other features like partial word searching and such, that's what makes this component so powerful and different in the best way.

And thank your for this code

$option = JRequest::getVar('option', 'com_virtuemart');
if ($option == 'com_virtuemart')
// print pagination

that's what I needed :)

9. It does, it just doesn't load VirtueMart CSS and the HTML content of your page is absolutely different, so make sure you use a div that is in the HTML structure also on the article view, not just VM pages.
Posts: 21
Joined: Thu Sep 26, 2013 11:08 pm

Re: VM2 Ajax Search Features/Bugs

Postby admin » Wed Jul 16, 2014 11:27 am

hello - to load your VM css you must make sure that it's loaded from the category theme, not from elsewhere of your theme. there is no way to find out if your system loads the css from a plugin, or index.php of your theme per the com_virtuemart especially when the component does not run under com_virtuemart.

therefore all the css should be included from the files where it is applied - i.e. category, product views.
/templates/your templaet/html/com_virtuemart/category/default.php (for example)

best regards, stan
Site Admin
Posts: 2654
Joined: Wed Jan 06, 2010 11:43 pm

Return to VirtueMart and Joomla Extensions (free or paid)