Site Search Button Implementation in SuiteCommerce
Implement the Site Search button in SuiteCommerce for enhanced user navigation with HTML examples and customization options.
The Site Search button is an integral feature available by default in the SuiteCommerce Base Theme. Users can click this button to access the Site Search input bar, allowing for a seamless search experience on both desktop and mobile platforms. Proper implementation ensures users can quickly locate desired content on the site, enhancing navigation and usability.
How to Implement the Site Search Button
To incorporate the Site Search button into your SuiteCommerce theme, use the following HTML code. This implementation is backward compatible with themes developed prior to the 2018.2 release.
Desktop Implementation
<div class="header-menu-search" data-view="SiteSearch.Button"></div>- Base Theme Module: Header
- Base Theme Template: header_menu.tpl
Mobile Implementation
<div class="header-menu-searchmobile" data-view="SiteSearch.Button"></div>- Base Theme Module: Header
- Base Theme Template: header.tpl
Site Search Input Bar
The Site Search input bar is essential for users looking to perform searches on the site. It typically relies on the following implementation:
1<div class="site-search" data-type="site-search">2 <div class="site-search-content">3 <form class="site-search-content-form" method="GET" action="/search" data-action="search">4 <div class="site-search-content-input">5 <div data-view="ItemsSeacher"></div>6 <i class="site-search-input-icon"></i>7 <a class="site-search-input-reset" data-type="search-reset"><i class="site-search-input-reset-icon"></i></a>8 </div>9 <button class="site-search-button-submit" type="submit">{{translate 'Go'}}</button>10 </form>11 </div>12</div>- Base Theme Module: SiteSearch
- Base Theme Template: site_search.tpl
Customizing the Input Bar
By default, the Site Search input bar is hidden. However, to ensure users can access it immediately, you may add the active class to make it visible:
<div class="site-search active" data-type="site-search">Go Button
The Go button leads users to execute their site search action. Here’s how it is coded:
<button class="site-search-button-link" data-action="show-itemsearcher" title="{{translate 'Search'}}"> <i class="site-search-button-icon"></i></button>- Base Theme Module: SiteSearch
- Base Theme Template: site_search_button.tpl
Implementing and customizing these elements effectively can significantly improve user experience and facilitate easier site navigation.
Frequently Asked Questions (4)
Do I need to edit different templates for desktop and mobile implementations of the Site Search button in SuiteCommerce?
Is the Site Search button feature compatible with themes developed before 2018.2 in SuiteCommerce?
How can I ensure that the Site Search button enhances user experience on my SuiteCommerce site?
Which module of the SuiteCommerce Base Theme should I modify to implement the Site Search button for desktop?
Was this article helpful?
More in Commerce
- SuiteCommerce CAPTCHA Configuration Options and Setup
Configure SuiteCommerce CAPTCHA for enhanced security. Enable CAPTCHA for registration, login, guest checkout, and orders.
- Single Sign-On Integration for NetSuite Web Stores
Implement inbound single sign-on integration for NetSuite web stores using SAML or OpenID Connect for seamless access.
- Facets Management for Commerce in NetSuite
Facets management in NetSuite Commerce optimizes item search filters, enhancing performance and improving user experience.
- SuiteCommerce Analytics Data and Cookie Consent Integration
SuiteCommerce Analytics Data enables tracking of shopper behavior. This requires a cookie consent extension for user preferences.
Advertising
Reach Commerce Professionals
Put your product in front of NetSuite experts who work with Commerce every day.
Sponsor This Category