web design, England, Britain, UK, belgium
 
Ulti Clocks content

A Joomla 1.5 (Native) module for live (AJAX) searches of Virtuemart 1.1.0 product names

sand A Joomla 1.5 (Native) module for live (AJAX) searches of Virtuemart 1.1.0 product names. The product search module can search just for product names or product names, descriptions and category names.
search, product, virtuemart, result, names, results, live, template, page, box, language, version, displayed, mod, returned, code, browse, installation, module, element, normal, php, css, site, text, add, select, descriptions, changed, urls, categories, option, folder, url, download, root, install, end, included, leave

Home Joomla - VirtueMart VirtueMart Live Product

Wed

11

Mar

A Joomla 1.5 (Native) module for live (AJAX) searches of Virtuemart 1.1.0 product names

  • Joomla 1.5
  • mod_virtuemart_live_product
16.06.2009
A new version released today with all bugs in IE fixed.
If you have an old version please download mod_virtuemart_live_product_1.1.2.j15.v0.6.zip and replace the previous one. (uninstall/re-install)
Added an option added in the backend to input the folder for url-redirect if your installation is not in the root.
The language string for no results has to be changed as well. See below.
VirtueMart Live Product Search
A simple module for live VirtueMart product searches.
This is based on the excellent mod_pixsearch live search module designed by Henrik Hussfelt

You can try it here - Demo ... and download it here - Download

How it works -

  • The string that is typed in the search box is sent as a search request to the normal VirtueMart search page.
  • The returned result has the product names and product page urls extracted and displayed under the search box.
  • If there is only one result a message is displayed and the browser is re-directed to the product page.
  • If there is no result this is displayed in the results box.
  • You can select via the back-end whether you want to search only for "Product Names" or "Product Names, Descriptions, SKU and Categories".
  • A minimum of 3 letters is needed, if you want one or two letter minimum this can be changed in the code but a hack is also needed in the VirtueMart core file classes/ps_main.php around the line 1260.

    Joomla 1.5 VirtueMart Live Product Search logo
    if( $strlen > 2 ) { 
    change to
    if( $strlen > 0 ) { 
    for 1 letter etc....


Installation -


  • Install in the normal way via Extensions-->Install/Uninstall.
  • Enable the module in the desired position.
  • To detect the "no result" condition you need to add a class to the "no result" text in all the relevant VirtueMart language files.
    Open administrator/components/com_virtuemart/languages/common/your_language.php and on ~ line 57 add these span tags to the translation text like so...

    'PHPSHOP_NO_SEARCH_RESULT' => 
    'Your search returned 0 results.
    '


    Do this for each installed language.
  • English, German, Czech, Hungarian, Dutch & French language files are included.
    Any other translations you make please include in a comment below, it's only 6 lines Laughing

Configuration -


  • A text can be included before and after the search box.
  • If your installation is not in the root you can input the sub-folder with a trailing slash.
  • "VM Searchpage URL" refers to the VirtueMart Extended search url
    (normally " index.php?option=com_virtuemart&page=shop.browse&Search=Search")
  • The default CSS is at
    "your-site/modules/mod_vm_live_product/css/vm_live_product_default.css".
  • The absolute positioned results div can be adjusted by margins in the parameters.
  • Choose whether you want to search by "Product Names" or "Product Names, Descriptions, SKU and Categories".
  • You must select the correct VirtueMart Browse Template for the extraction to be able to find the resulting product names and urls.
    You can see which template your using at
    Components-->Virtuemart--> and then Administration-->Configuration-->Site-->Category Template.
    It doesn't function with 'Managed'or 'browse_lite_pdf'.
    If you have modified the selected Template enter "other" and fill in the element in the field below.


Fine tuning if a non-standard VirtueMart Browse template is used.

VirtueMart Live Product Search
The module uses Javascript to extract the product names and urls from the returned search results.
If you have changed the standard distributed templates the Javascript needs to know in which elements it has to look for this information.
To do this you need to look at the source code of a returned search result and find which element is unique to the product name.

Example


Do a normal VirtueMart search in your shop for a search phrase that will return more than one result.
Then display the source code of the results page and find the first product title.
In this example it is contained within a h3 tag. So that is the element we would insert in the "Other Template Element" field.
Code extract
<td><div class="browseProductContainer"> <div class="jamod module"><div><div><div> <h3 style="border-bottom: none;padding:10px 10px 0px 10px;text-align:center;min-height:30px"> <a style="font-size: 13px; font-weight: normal;text-decoration:none;" href="/Piatnik-Deutschland/Spiele-fur-Familien-Freundeskreis/ab-4-Jahren/Activity-Kinder.html?keyword=kinder"><b>Activity Kinder</b></a> </h3> <p style="height:53px"> <span class="productPrice"> EUR 18,89 inkl. 19 % MwSt. </span>
etc etc .....

Updates

Paypal Donation

If you use this module on your site please donate a small amount.
Any donation amount appreciated.

Version 0.4
Better handling of no result - now the "no result" message is displayed in the results box

Version 0.5
Now able to select via the back-end whether you want to search only for "Product Names" or "Product Names, Descriptions and Categories".

Version 0.6
All bugs in Internet Explorer fixed.
Option to add non-root installation folder.

If you have any comments, suggestions or need any help please leave a comment below.
If you use it on a commercial site (if it's Virtuemart I guess it's got to be commercial Wink ) please leave a small donation.
Thanks.


Add this page to your favorite Social Bookmarking websites
Digg! Reddit! Del.icio.us! Mixx! Free and Open Source Software News Google! Live! Facebook! Slashdot! Technorati! StumbleUpon! Spurl! Newsvine! Furl! Fark! Yahoo! Netvouz! Mister-Wong! RawSugar! Ma.gnolia! Squidoo! DZone! Swik!
Last Updated on Saturday, 12 December 2009 12:22 Read : 14726 times
 
Comments (38)
@Patrick
38 Saturday, 30 January 2010 13:34
First Name Last Name
If you email me through the site contact page I will have a look.

GJC (Admin)
No records found for other languages
37 Saturday, 30 January 2010 12:31
Patrick
Hi,

The module works fine for my default language 'dutch' but not for other countries.

For example:
I have a category "Omslagen" which is translated by Joomfish to "Enveloppes" in French. When I have choosen the French language for my site and type 'enve' in the search module it does'nt find any records. When I type 'omsl' in the dutch site it returns all the products.

I am using Joomla 1.5.14, Virtuemart 1.1.3, Joomfish 2.0 and the latest version of VM_LIVE_PRODUCT_SEARCH.

Can somebody help me please?
@maryonee
36 Monday, 19 October 2009 15:33
GJC (admin)
Would require some hacking of the module and core files.
If you want you can mail me via the Contact page.
addtional search features
35 Monday, 19 October 2009 15:29
maryonee
I am very satisfied about Live Product Search, but I have made some new producttypes and parameters in VM which I also want to use in the searchmodule. Is there some way to add more search options?
@chris j
34 Thursday, 15 October 2009 18:28
GJC (admin)
Why doesn't it return the same result?
Try it here on the site, the results are identical with AJAX or "Enter"
Email me via the contact page with details....
search or return gives different results page
33 Thursday, 15 October 2009 13:14
chris j
Hi
This is a great module but if a user enters a keyword and then return/enter or the search button before the results are displayed it displays returns results by reverting to the 'standard' search...
Is there anyway to change this so that the button or return gives the same result??
If I can do this I am happy to donate becuase it's a great module... but without this ability my client does not want to use it as he wants 'consitent' results. Thanks
any ideas?
Some Problems
32 Tuesday, 06 October 2009 22:45
JT
I have installed the search module and it works but the results are displayd below 2 existing banners on my home page. Is it possible to make the results appear on a clean page??
Some problems
31 Tuesday, 18 August 2009 21:28
Andrey
Hello!

I yesterday set your module of living search for Joomla.For me Joomla of version is set 1.5.14 and Virtuemart of version 1.1.3.

A situation consists in the following:

When I enter in the field of search for example "Nokia" that Your module finds automatically, that in my catalogue there is a commodity, which is named as "Nokia" and shows that one product is found, although commodities with the name of "Nokia" at least about 5.

How to do so, that when I enter a searching word and search finds accordance, for example two products, represented so, that is found two products, but in any way not one, but if it is found five, represented, that is found five. The question is now not about searching results, but about inscription in a pop-up window, which does not change and if that is found, it always shows that one product is found.


It is necessary to notice that when a page appears already with the results of search, there all is represented right, and all found commodities are present.

The second problem consists in that when I edit the CSS file and propose necessary me position of the module of search, both all is represented right, but as soon as I produce the first search or the module of search is displaced a bit upwards and to the right. But after a subsequent search, position does not change.

If you are not heavy, prompt me that is responsible for CSS of searching line and button of search, when man-hunted information. How to set position of the module in the static mode, I understood, bringing in small changes in CSS file and equalizing the line of search and button of search in one row.

If necessary, I can deport you the proper pravlenye by me files. With kind regards, Andrey! Smile
Translate
30 Tuesday, 21 July 2009 13:44
@Kevin
This is from VM, you have to install the VM translations
Translate
29 Tuesday, 21 July 2009 10:00
kevin
hi
but I have a problem with translating. when I click on advance search, there is a new page with English text (
Advanced Search according to Parameters
You can further refine your search by adding...) how can I translate this?? any help
searchbox length
28 Tuesday, 30 June 2009 10:47
@ravi
in the css, line 12
about editing of live search box length
27 Tuesday, 30 June 2009 10:23
ravi
hi everybody nice module.....!
here in this module i want to change the length of the search box.
how can i change it .
which file i need to modify...
please help me...........urgent Smile
@ Ca1ypso
26 Tuesday, 16 June 2009 15:33
GJC (admin)
All I can say in 99% of the cases if you follow the instructions above it will work.

Sorry, but after nearly 1,500 downloads and 1 donation if you would like further help then the donation button is above. Wink

Cheers
AJAX search results problem
25 Tuesday, 16 June 2009 13:58
Ca1ypso
Hi! I updated this morning to the latest version of VM Live search hoping this would rule out my javascript problem on IE and "live" search results in general (even if there are results, the box always show a "no result, redirection" messsage, then redirects to the correct page/browse page). But it did not! I heard this could be a css problem? Do you have any idea?? Thank you for your help
redirect problem solved
24 Thursday, 11 June 2009 17:54
riesurya
This module have a nice feature, and I do have same experience with the redirecting problem.

When I type (min 3 chars), it redirecting to base root ( in this case I'm using xampp as localserver).

with the clue from Mukesh, I do some modification:

1. go to modules/mod_vm_live_product/js/vmliveproducts.js

2. in line 58 found:
var requrl = "/index.php?keyword1="+$('vmlp_search_str').value+"&Search=Search&Itemid=1&option=com_virtuemart&page=shop.browse&search_limiter="+(_searchBy);

and change into

var requrl = "index.php?keyword1="+$('vmlp_search_str').value+"&Search=Search&Itemid=1&option=com_virtuemart&page=shop.browse&search_limiter="+(_searchBy);

and the redirecting is perfectly ( not going to base root anymore) Very Happy

Thanks for nice module (I just started learn with Virtuemart)
Problems in IE
23 Wednesday, 10 June 2009 19:17
GJC (admin)
Yes amazingly after nearly 1500 downloads I've had 3 reports in the last week that it is throwing errors in IE, none before!

There is a problem and I'm nearly finished a new version that will be error free.

Just having a lot of problems detecting the "no result" in IE, as soon as that is solved I will release it.
Is it conflict with IE??
22 Tuesday, 09 June 2009 15:37
Kevin Cheong
Thanks for the developer for this great work.

I encounter a problem when i use IE8 to search, it show nothing or no result at all...

the error message like this:
Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; GTB6; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; InfoPath.2; .NET CLR 3.5.21022; .NET CLR 3.0.30618; .NET CLR 3.5.30729)
Timestamp: Tue, 9 Jun 2009 15:13:56 UTC


Message: Unknown runtime error
Line: 38
Char: 1402
Code: 0
URI: http://lifegoldmine.com/media/system/js/mootools.js


Message: Unknown runtime error
Line: 38
Char: 1402
Code: 0
URI: http://mysite.com/media/system/js/mootools.js

Can anyone figure it out what is the happen? is it mootool conflict with this?
search result redirect problem
21 Tuesday, 02 June 2009 11:21
mukesh
After entering the keywords in the search box , it used redirect to its parent folder e.g. my current page is http://localhost/joomla/index.php which used to redirect to http://localhost/index.php?...

This is simple workaround

steps 1 :- go to the module directory in my case it was C:\wamp\www\joomla\modules\mod_vm_live_product\js

step 2:- you will find a js file vmliveproduct.js ,now go to the line where it says
var requrl = "/index.php?keyword1="+$('vmlp_search_str').value+"&Search=Search&Itemid=1&option=com_virtuemart&page=shop.browse&search_limiter="+(_searchBy);

now here simply change the url to
var requrl = "/joomla/index.php?keyword1="+$('vmlp_search_str').value+"&Search=Search&Itemid=1&option=com_virtuemart&page=shop.browse&search_limiter="+(_searchBy);

you will see that i have added joomla to the path thats becoz this is my root folder .. so simple you just have add your root folder name

Thats it .

Please note that this is only for those who is having the redirect problem ...

Have a nice day

All goes well when you work well
Flemming
20 Sunday, 31 May 2009 13:58
GJC (admin)
Hi,
Can we move this conversation to email as this isn't an ideal way to talk.. Wink
Please mail me via the contact page so I can help you..
Danish
19 Sunday, 31 May 2009 10:48
Flemming
Oh! I think I have found the issue now! It seems like the search go too my www.mydomain.dk instead of www.mydomain.dk/subfolder

How can I manage that?
Danish
18 Sunday, 31 May 2009 10:14
Flemming
Thanks again! Of course I´ll pu up a rewiew. I also wants to put in a donation as soon as i get it to work properly.

I only have 1 issue right now.

1. When you punch in words nothing happens. No redirections or anything. But when you punch enter it all work as it should.
Try it out on www.helseform.dk/butik

Thanks again
Danish translation
17 Sunday, 31 May 2009 08:55
GJC (admin)
Hi Flemming,
just copy one of the supplied language files, e.g. en-GB.mod_vm_live_product.ini (utf - without BOM), translate it into Danish and rename it dk-DK.mod_vm_live_product.ini.
Then ftp it to your language/dk-DK folder.
Please leave a review on Joomla extensions as payback.. Mr. Green
Text inside search field
16 Saturday, 30 May 2009 22:56
Flemming
HI! This module is just what I was looking for. I like it. It works well in danish language but i need to translate "search ... 3 letters min" into danish. But i dont know where to find the text & change it. Is it possible for you to help me with this?

Thanks very much!
loveand wisdom
15 Wednesday, 06 May 2009 08:54
GJC (admin)
@avi,
That's the least of your worries, the search doesn't work....

Re the whitespace..
My div is surrounded by 5 other divs all with styling before you get to mine

mod-default
module default
module-2
module-3
module-4 deepest
form name pp_search
vmlpsearch

For why it doesn't work my first guess would be a javascript conflict.

There is a lot in your page, try disabling some until it starts to work...
CSS problem
14 Wednesday, 06 May 2009 01:09
Avi
Hi,

For some reason I'm getting to much white space under the module :

http://www.loveandwisdom.net/shop.html

Any ideas?

Thanks
Some error
13 Saturday, 02 May 2009 06:18
GJC Admin
@Joel,
My module is not at this address... Question
Not working for some reason
12 Friday, 01 May 2009 21:08
Joel
Hello! installed module and placed it where I need it to go, however, it is messing up and giving some error. Can you take a look please? my url is http://174.136.3.211/~admin/ . Thanks!!
No suits!
11 Sunday, 26 April 2009 07:57
GJC
@Andrew,
Hi, can you give me the url of your site so I can have a look.....
Also have you got the latest version?
0.5?
GJC
help with getting it to work please friends
10 Sunday, 26 April 2009 05:53
XDoKToR
Hi,
love the search mod. but...
have installed the mod. & edited lang. file but when I type eg 'suit' i get no result and get automatically bumped back to the home page(and yes there are suits in the VM! lol)
standard VM search works fine however...

I'm using VM 1.1.3 & J! 1.5.10

any thought oh great ones?
cheers
Andrew
Search by SKU
9 Thursday, 09 April 2009 19:47
GJC
@Ted,
The good news is it does already if in the module parameters you've chosen the name, category and description option although I hadn't documented that.(Will now)
If you try in the VM Live Search above H02 you'll get the hammer (SKU is H02 in this case Mr. Green).
Are you the same Ted that emailed me? I assume you got it working Question
Works Nice!
8 Thursday, 09 April 2009 17:28
Ted
Very nice module, works well. Will you be adding search by SKU at any point?
Live Search for Joomla 1.0.15 version
7 Tuesday, 07 April 2009 07:52
GJC
Hi Shawn,
There's already an AJAX search for 1.0.15 version out there, not as good as mine of course Mr. Green
Here's the link AJAX search for 1.0.15
Any Joomla 1.0.15 version
6 Tuesday, 07 April 2009 03:41
Shawn
Desperately need an update. Any chance you'll complete a 1.0.15 version?
Translation
5 Friday, 27 March 2009 09:02
GJC
Thanks Plieka, could you post this as well on the VirtueMart forum?
Cheers
translation position
4 Thursday, 26 March 2009 20:05
Plieka
The language file Dutch.php under
administrator/components/virtuemart/languages/shop needs to be update for the next section

'PHPSHOP_SEARCH_TEXT1' => 'De eerste drop-down lijst geeft u de mogelijkheid om een categorie te selecteren waarin u wilt zoeken.
Met de tweede drop-down lijst kunt u aangeven in welke productinformatie u wilt zoeken (bv. Naam).
Wanneer u een keuze genaakt
needs to be changed into gemaakt
Translation
3 Thursday, 26 March 2009 11:57
GJC
@Plieka
Thanks for the comment.
If you've got the time a review to the Joomla Ext site would be nice Smile.
VirtueMart Live Product Search Review
Also I can't find the translation you refer to?
Great tool
2 Thursday, 26 March 2009 10:05
Plieka
Thanks this mod work like a charm.

Only thing was the translation of the Extended search was wrong

genaakt should be gemaakt

thnks
Works well
1 Thursday, 12 March 2009 19:49
ITguy
Worked "out of the box"..
Thanks Smile

Add your comment

BoldItalicUnderlineStrikethroughSubscriptSuperscriptEmailImageHyperlinkOrdered listUnordered listQuoteCodeHyperlink to the Article by its id
Very HappySmileWinkSadSurprisedShockedConfusedCoolLaughingMadRazzEmbarrassedCrying or Very SadEvil or Very MadTwisted EvilRolling EyesExclamationQuestionIdeaArrowNeutralMr. GreenGeekUber Geek
Your name:
Subject:
Comment:

Our Recommended Reading

For those interested in extending their knowledge of Joomla! & VirtueMart, Packt Publishing has an excellent range of help & how to books.
Listed below are some I can recommend.
Simply click on the images to be taken directly to their web shop.

Joomla! Web Security
Joomla! Web Security
by Tom Canavan.
Joomla! Template Design: Create your own professional-quality templates with this fast, friendly guide
Joomla! Template Design:
Create your own professional-quality
templates with this fast, friendly guide
by Tessa Blakeley Silver.
Magento: Beginner's Guide
Magento: Beginner's Guide by William Rice
is a must for anyone trying the
open-source e-Commerce solution.

Read the review
object-oriented-javascript-applications-libraries
Object-Oriented JavaScript by Stoyan Stefanov
gives you a very comprehensive
grounding in the latest Javascript techniques.

Read the review

Showcase

  • An Image Slideshow
  • An Image Slideshow
  • An Image Slideshow
  • An Image Slideshow
  • An Image Slideshow
  • An Image Slideshow
  • An Image Slideshow
  • An Image Slideshow
  • An Image Slideshow
  • An Image Slideshow
  • An Image Slideshow
  • An Image Slideshow
  • An Image Slideshow
  • An Image Slideshow
  • An Image Slideshow
  • An Image Slideshow
  • An Image Slideshow
  • An Image Slideshow
  • An Image Slideshow
  • An Image Slideshow
  • An Image Slideshow
  • An Image Slideshow
  • An Image Slideshow
  • An Image Slideshow
  • An Image Slideshow
  • An Image Slideshow

Paypal Donation

If you use this module on your site please donate a small amount.
Any donation amount appreciated.

VM Live Product Search

Latest Joomla & VirtueMart Tips

See all tips & examples

VirtueMart A-Z Module

Use the letters C or S as there's not many products in the test shop!
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 0 1 2 3 4 5 6 7 8 9

Letter D will return one result i.e. the product page.

Alexshop.de

News image

Private club based shopping site. 3 languages with full shop including "Back-end", order control, newsletter subscriptions and member invitations. Fully integrated "community" setup to include membership, newsletters, logins and...

Readmore

Midrangeint.com

News image

Midrangeint.com Multi-page site with Content Management System for an International IT Consulting company. Achieves top ranking search results for IBM Software Integration terms. e.g. Google results for "IBM system i"...

Readmore

Vandegaar.be

News image

Multimedia site for a Belgian stairways, doors and floors workshop. 4 languages with extensive photo galleries, flash animation and Quicktime 3D embedded views.

Readmore



A Joomla 1.5 (Native) module for live (AJAX) searches of Virtuemart 1.1.0 product names



A Joomla 1.5 (Native) module for live (AJAX) searches of Virtuemart 1.1.0 product names. The product search module can search just for product names or product names, descriptions and category names.


search, product, virtuemart, result, names, results, live, template, page, box, language, version, displayed, mod, returned, code, browse, installation, module, element, normal, php, css, site, text, add, select, descriptions, changed, urls, categories, option, folder, url, download, root, install, end, included, leave