Jump to content

Autocomplete no longer works in product page (PS 1.7)


Recommended Posts

Hi guys.

The autocomplete JS in my module's product page hook stopped working in PS 1.7. I have the exact same code in a custom controller and that works, but in the product page it throws an error: 

TypeError: this.source is not a function. (In 'this.source({term:e},this._response())', 'this.source' is null) in main.bundle.js:187

The code is the following:

$(document).ready(function()
{
	var items = [
		"Item 1",
		"Item 2"
	];

	$('#myinput').autocomplete(items, {
		minChars: 1,
		matchContains: true
	});
});

 

Link to comment
Share on other sites

Well, autocomplete is a function, but it's a different function in the product page. It doesn't have the same arguments. That's what it looks like to me. I can't find any documentation though and it's pretty hard to reverse engineer the other autocomplete fields in the product page..

Link to comment
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
×
×
  • Create New...