Implemented the back-end logic of the search

Implemented the product search's back-end logic the search-model.php and
connected it with the front-end. Added a utility function in utils.js