Download the PHP package fond-of-spryker/google-custom-search without Composer
On this page you can find all versions of the php package fond-of-spryker/google-custom-search. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download fond-of-spryker/google-custom-search
More information about fond-of-spryker/google-custom-search
Files in fond-of-spryker/google-custom-search
Package google-custom-search
Short Description Implements Google Search into the Spryker Suite
License MIT
Informations about the package google-custom-search
fond-of-spryker/google-custom-search
Implements Google Search into the Spryker Suite
Install
Configuration
First, you should complete the configuration of the Google API in your configuration, e.g. under config/shared/config_default.php
For more information, see the official documentation at https://developers.google.com/custom-search/json-api/v1/overview
You can add different CX_KEYs for locales by extending the key with the locale, in example:
Dont forget the underscore between the key and locale!
The default route for search is localed with /de, you change this in the GoogleCustomSearchControllerProvider. If you dont need any localized route just remove the language parameter in URL.
Add GoogleCustomSearchWidget::class to ShopApplicationDependencyProvider
Add GoogleCustomSearchControllerProviderPlugin to RouterDependencyProvider
Render the form
To render the search form use the following code. If you want to change the routes, expand the module as you like using the Spryker workflow
Results
The search results are displayed under the URL
If you need a different route, just expand the module how you like
Under /Yves/Theme/default/ search you will find two example templates. Feed free to implement your own.
Changelog
2.0.0 - added Support for Spryker 202001.0
All versions of google-custom-search with dependencies
spryker/glossary Version ^3.8.0
spryker/zed-request Version ^3.12.0
fond-of-php/google-custom-search Version ^2.2.0