Jump to content
auzStar

[Addon] Twitter Typeahead Autocomplete Search for osC 2.3.4 (BS and nonBS)

Recommended Posts

48 minutes ago, inra311 said:

There was one little mistake in the fix:

replace preg_with mb_ereg_replace

I guess it should be

replace preg_replace with mb_ereg_replace

@inra311 you are correct.

Cheers, Eddy

Share this post


Link to post
Share on other sites
On 5/27/2018 at 6:32 PM, auzStar said:

It seems that the cookie.js file (which this add-on needs) has been removed from the latest 2.3.4.1 CE version, not sure why.

The installation routine never checked for this file as it assumed it was always there. It only checked for the files that were being uploaded for this add-on.

I have attached a zipped copy of the file. Download and extract it to "ext/jquery" folder on your server.

See if that fixes your problem.

Hopefully nothing else has been changed in the latest 2.3.4.1 CE version to break add-ons.

Hi @auzStar,

What does this cookie.js do?  I do not have it on my latest osC Frozen but this add-on of yours works just fine.  Please advise.

Thanks, Eddy

Share this post


Link to post
Share on other sites

I have this working on my BS4 test site but the search icon appears below the form. I applied this quick fix to user.css but am wondering if there is a better way. Does ht-twitter-typeahead.css need to be updated to BS4?

.input-group-append {
    margin-left: -42px;
}

 


The water in a vessel is sparkling; the water in the sea is dark. The small truth has words which are clear; the great truth has great silence.

- Rabindranath Tagore

Share this post


Link to post
Share on other sites

@auzStar   hi,

thank you for this great addon. It is working great!

i also  install theme switcher and with few clicks, you can change the theme easily.
right now i am setting dark background and that make the search result hard to read, which file should I check to change the color setting for search result text color, and is there a way it can auto change depending on UI setting?

also i like to type a hint in the search blank area to let users know please at least type min 3 letters, which files should I change?

image.png.c972ed92f219496f933955bf85f70c9e.png

many thanks!

 

Lynn

Edited by ce7

Share this post


Link to post
Share on other sites

Hi @auzStar 

First I wanted to congratulate you for this excellent addon!

Now I have an ignorant question.

Because when I see the source code of my site page in chrome or firefox , all the contents of the file appear
  \ 234bs \ full_package \ catalog \ ext \ typeahead \ js \ ht-twitter-typeahead.js.php

With other addons the source code never appears on the final web page.

Thank you and again congratulations for this great addon.

Valqui

 


Please do not falsify my words. Are you interested in knowing who does it? Send me a PM.

The Phoenix Club won't allow me to join - why not?

Setting up a new Frozen site with so many nice addons available on the market. 

:heart: Community Oscommerce fan :heart:

 

Share this post


Link to post
Share on other sites

@valquiria23

The file contains javascript code. It's the javascript code that appears in the source which is normal.

cheers


My Add-ons
Advanced Cache Control Tool for osCommerce 2.3.x (non-bootstrap) Download Support
Ajax Product Listing for osC 2.3.4 (bootstrap) Download Support
Category New Products Carousel for osC 2.3.4 (bootstrap) Download Support
Category Popular Products Carousel for osC 2.3.4 (bootstrap) Download Support
Customer Testimonials for osCommerce 2.3.4 (bootstrap and non-bootstrap) Download Support
Front Page New Products Carousel for osC 2.3.4 (bootstrap) Download Support

Index Nested - Product Listing for osC 2.3.4 (bootstrapDownload Support
Match Categories in Search Results for osCommerce versions 2.3.x (non-bootstrap) Download Support
Modular Category Page for osC 2.3.4 (bootstrap)
Download Support

NEW Australia Post Shipping Modules for osCommerce 2.3.x (non-bootstrap) Download Support
NEW Equal Height Module for osC 2.3.4 (bootstrapDownload Support
Products Low Stock Report for osC 2.3.x (bootstrap and non-bootstrap) Download Support
Twitter Typeahead Autocomplete Search for osCommerce 2.3.4 (bootstrap and non-bootstrap)
Download Support

Upcoming Products Modules for osC 2.3.4 (bootstrap) Download Support

 
Assisted Add-ons
Scroll Boxes for osCommerce 2.3.x (bootstrap and non-bootstrap) Download Support
 
Bootstrap Add-ons created by other members
osCommerce Bootstrap Addons and Code

Share this post


Link to post
Share on other sites

Hello @auzStar


All working perfectly with Edge version, with new phoenix version not at all so far - search bar only gives "No matches"

Tried even to hook js to sitewide\jquery

Any recommendations?
Thx 

 

 

 


Getting the Phoenix off the ground

Share this post


Link to post
Share on other sites

@Peper

This may not apply to you, but ...

I am using another typeahead search module, but found issues with different browsers (I can point you to the thread if you wish).

May I suggest:

1) Try a different browser

2) Try searching on any page other than the home page.

Malcolm


Get the latest Responsive osCommerce CE (community edition) here .

Share this post


Link to post
Share on other sites

I have this working on a Phoenix test site and it works correctly. The only trouble being is that the search button locates under the seach box, but with a bit of negative figures in the css it sort of looks right all on one line. I dont think I had to make any changes to any of the latest code.

search.jpg


REMEMBER BACKUP, BACKUP AND BACKUP

Get the latest Responsive osCommerce CE (community edition) here

It's very easy to over complicate what are simple things in life

Share this post


Link to post
Share on other sites
26 minutes ago, 14steve14 said:

I have this working on a Phoenix test site and it works correctly.

Try letting Malcolm play with it.  😂

Dan

Share this post


Link to post
Share on other sites

Absolutely strange

I setup a new phoenix install with the autocomplete search and is working(local pc)
Compared page sources and almost a match except well for https and few little things

Diffrence found :
The working one have '&search_in_description=1'
the non working one '&search_in_description=1'

In file ht-twitter-typeahead.js.php 
I changed '&search_in_description=1\'  to read '&search_in_description=1\'
Now search is working correctly

but even so, my working live site = &search_in_description=1 and works perfectly - same server

I'm not so sure the problem was corrected this way changing & to &
 


Getting the Phoenix off the ground

Share this post


Link to post
Share on other sites

I must be missing something. Tried to install twice on Phoenix. Does not work for me at all. Did any one above make any changes to make it work?

Peter


PROUDLY PASSIONATE PHOENIX SUPPORTER

Full-time I am a C-suite executive of a large retail company in Australia. In my spare time, I enjoying learning about web-design.

Download the latest version of CE Phoenix from gitHub here

Join the Phoenix Club. Become a Phoenix Supporter.  Gain access to special codes and modules and help the project thrive. Read here

 

Share this post


Link to post
Share on other sites
16 hours ago, peterpil19 said:

I must be missing something. Tried to install twice on Phoenix. Does not work for me at all. Did any one above make any changes to make it work?

Peter

Fixed. It does require a code change. Line 51 of the header tags module points to a cookie.js file that does not exist locally on Phoenix. You can change the address to an online version of that file e.g.  https://cdnjs.cloudflare.com/ajax/libs/jquery-cookie/1.4.1/jquery.cookie.js


PROUDLY PASSIONATE PHOENIX SUPPORTER

Full-time I am a C-suite executive of a large retail company in Australia. In my spare time, I enjoying learning about web-design.

Download the latest version of CE Phoenix from gitHub here

Join the Phoenix Club. Become a Phoenix Supporter.  Gain access to special codes and modules and help the project thrive. Read here

 

Share this post


Link to post
Share on other sites
On 10/31/2019 at 3:43 AM, 14steve14 said:

I have this working on a Phoenix test site and it works correctly. The only trouble being is that the search button locates under the seach box, but with a bit of negative figures in the css it sort of looks right all on one line. I dont think I had to make any changes to any of the latest code.

search.jpg

The alternative way to fix the button issue is to change the "input-group" class in bm_search.php and content_header_search.php to "input-group-prepend" at Lines 37 and 46, respectively. Refer documentation on bootstrap forms: https://getbootstrap.com/docs/4.0/components/input-group/


PROUDLY PASSIONATE PHOENIX SUPPORTER

Full-time I am a C-suite executive of a large retail company in Australia. In my spare time, I enjoying learning about web-design.

Download the latest version of CE Phoenix from gitHub here

Join the Phoenix Club. Become a Phoenix Supporter.  Gain access to special codes and modules and help the project thrive. Read here

 

Share this post


Link to post
Share on other sites
3 hours ago, peterpil19 said:

Fixed. It does require a code change. Line 51 of the header tags module points to a cookie.js file that does not exist locally on Phoenix. You can change the address to an online version of that file e.g.  https://cdnjs.cloudflare.com/ajax/libs/jquery-cookie/1.4.1/jquery.cookie.js

That code change was already done in the version that I installed.

Your other code changed worked on positioning the button correctly but had to be changed in includes/modules/content/header/cm_header_search.php


REMEMBER BACKUP, BACKUP AND BACKUP

Get the latest Responsive osCommerce CE (community edition) here

It's very easy to over complicate what are simple things in life

Share this post


Link to post
Share on other sites

Is there any way to add search suggest functionality to this great add-on? Autocomplete helps but I still see customers misspelling words and they can't find what they are looking for.


The water in a vessel is sparkling; the water in the sea is dark. The small truth has words which are clear; the great truth has great silence.

- Rabindranath Tagore

Share this post


Link to post
Share on other sites
On 2/8/2016 at 10:33 AM, Dan Cole said:

Now that I have it functioning I've been testing it a bit and noticed that on the first page load when visiting my site I get "no matches" but if I go to another product category and repeat the same search it pulls up the results you'e expect. 

Hi Dan - I installed this very cool contribution yesterday on my test site and I am experiencing the same as you mentioned above.

What should I be looking for to troubleshoot the issue?  What did it turn out to be in your case?

I'm using the latest version of the contrib with 2.3.4.1 CE and lots of other mods to boot.  Just don't know where to begin looking for suspects.  Thanks for your time!

- Andrea

Share this post


Link to post
Share on other sites

@puggybelle @Dan Cole

While I was trying to install a different TypeAhead search module, I too had the same issues that both you and Dan reported. You can start reading about them here:

I was getting different results on my in-house development server and my 'live' public server. I was getting different results with different browsers. I asked different people to test the public server, and different people experienced different results.

I never determined what was causing the problem. I wish I had better news ...

Malcolm

 


Get the latest Responsive osCommerce CE (community edition) here .

Share this post


Link to post
Share on other sites
1 hour ago, puggybelle said:

Hi Dan - I installed this very cool contribution yesterday on my test site and I am experiencing the same as you mentioned above.

What should I be looking for to troubleshoot the issue?  What did it turn out to be in your case?

I'm using the latest version of the contrib with 2.3.4.1 CE and lots of other mods to boot.  Just don't know where to begin looking for suspects.  Thanks for your time!

I think I gave up on this one...faced the same issues and fate as Malcolm did.  My advice...move along...it will be a time sink and not likely end well.

Dan

Share this post


Link to post
Share on other sites

@ArtcoInc and @Dan Cole

It's a shame...this issue of not working on the initial pageload. 

Once I click around my site, it works perfectly on any and all pages.

But, if buyers are going to see 'no matches' on their first try...assuming they're going straight for the search box when they enter the website...that's a killer.

Out the door they'll go.

It looks so nice and clean, too...I really wish I could use this!  Damn!

Guess I'll just keep checking the forum from time to time to see if anyone comes up with a remedy...you never know!  Thanks, guys!

- Andrea

 

Share this post


Link to post
Share on other sites
On 1/15/2020 at 6:25 AM, puggybelle said:

@ArtcoInc and @Dan Cole

 

But, if buyers are going to see 'no matches' on their first try...assuming they're going straight for the search box when they enter the website...that's a killer.

I tested in CE version, tried 3 times has same issue "no matches". Then tried to replace catalog/ext/ with V1.7, it works.
My observation, with the BS version, if type in two letters, it will show up filter correct product info, with CE, need to type in 3 letters at least...

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×