Laravel eCommerce Search suggestion is a feature to make it faster to complete searches that you’re beginning to type. It makes your website more attractive.
It packs in lots of demanding features that allow your business to scale in no time. This feature can be very beneficial for any eCommerce.
Feature
- The product category will be visible on auto search suggestions.
- The price of each product will be visible on search suggestions.
- Total searched terms will be visible on search suggestions.
- The product image will be visible on the auto search suggestion result.
- Admin can disable visibility of category/product/term from the auto search.
- Admin can set the total number of categories/products visible on auto search suggestions.
Installation
Unzip the respective extension zip and then merge “suggestion” inside the webkul package.
Goto config/app.php file and add the following line under ‘providers’.
Webkul\suggestion\Providers\suggestionServiceProvider::class,
Goto composer.json file and add the following line under ‘psr-4’.
"Webkul\\suggestion\\": "packages/Webkul/suggestion/src"
In the config/bagisto-vite.php file, add the following line under the ‘viters’ section:
'suggestion' => [ 'hot_file' => 'suggestion-default-vite.hot', 'build_directory' => 'themes/suggestion/default/build', 'package_assets_directory' => 'src/Resources/assets', ],
Run these commands below to complete the setup.
composer dump-autoload php artisan optimize php artisan vendor:publish --force
-> Press the number before “Webkul\suggestion\Providers\suggestionServiceProvider” and then press enter to publish all assets and configurations.
Run the following commands under the path packages/Webkul/Suggestion
npm i npm run build
After the successful installation of the module, the admin can also configure the module under the admin panel. The admin needs to Configure>>Search Suggestion>> Setting.
The admin can do various actions under the module configuration, as shown below:
On this page, there are severaloptions,s such as:-
Show:-
Categories: The admin can set any number of categories that will come under the dropdown of the search box.
Products: The admin can also set any number of products that will come under the dropdown of the search box.
Display-
- Terms: Admin can set Display Terms as Yes or No.
- Product: Admin can also set Display Products as Yes or No.
- Categories: Admin can also set Display Products as Yes or No.
Click on the Save button
In the front end, after inserting all the required details search suggestion is ready to display as shown below:-
The user can input keywords in the search bar, and the suggestions will appear below.
In the above image, shirt is the term that is searched.
- The first three searches show product names in their respective categories. Clicking on this will redirect you to the category page.
- After this, the term is shown that is searched, along with the number of products with that term.
- The popular products with that keyword are shown at the last.
Support
So, that was much about the User Guide of Laravel eCommerce Search Suggestion for any queries or doubts reach out to us at [email protected]. You can also raise a ticket at our HelpDesk System.
Please explore our Laravel Development Services and Quality Bagisto Extensions.
Current Product Version - 2.0.0
Supported Framework Version - Bagisto version 2.0.0
Be the first to comment.