The SearchSpring eCommerce widget SDK provides the framework for building your own frontend website widgets. This SDK also includes example widgets that you can play with and customize to integrate SearchSpring onto your own website.
- Install the newest versions of NodeJS and NPM
- Run
npm install
from this directory
- Run
npm run develop
from this directory - a browser window should open and display a list of all widgets in this repository - Click on 'simple' and then 'search' to view the simple search widget
- Open 'widgets/simple/search/src/main.js', edit some HTML, and save the file to see the live changes
Custom widgets must be hosted on your server. Here's how to do that:
- Run
npm run build
from this directory - Publish the 'dist' directory to your server
- Add this script to every page of your website:
<script src="/dist/widgets.js" searchspring-id="[YOUR-SITE-ID]"></script>
- [YOUR-SITE-ID] can be found on the My Account Page of the SearchSpring Management Console
- Add this where you would like your custom search results to appear:
<searchspring widget="simple/search" parameter="[YOUR-SEARCH-PARAMETER]"></searchspring>
- [YOUR-SEARCH-PARAMETER] is the URL query parameter that identifies your search term
Please let us know by creating in an issue on GitHub