teomor Posted February 6, 2019 Share Posted February 6, 2019 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 More sharing options...
Presta Bucket Posted February 9, 2019 Share Posted February 9, 2019 Hello, The js file might not be included, so that's why the system says that is not a function. Check the page source for the autocomplete.min.js or how is named in your module. Best regards, PrestaBucket Team Link to comment Share on other sites More sharing options...
teomor Posted February 11, 2019 Author Share Posted February 11, 2019 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now