Magento Integration
Seamlessly integrate Wearly's AI Search into your Magento store to enhance the shopping experience.
Magento + Wearly
Enhance your Magento store with Wearly's AI-powered search capabilities, providing your customers with a more intuitive and personalized shopping experience.
Prerequisites
Magento Requirements
- Magento 2.3.x or higher
- PHP 7.4 or higher
- Composer package manager
Wearly Account
- Active Wearly account with API access
- Wearly API key
- Wearly Client ID
Configuration
Admin Configuration
Configure the Wearly AI Search extension in your Magento admin panel:
Navigate to the Wearly configuration
Go to Stores > Configuration > Wearly > AI Search
Enter your API credentials
Add your Wearly API Key and Client ID in the respective fields
Configure search settings
Customize the search behavior, results display, and other options according to your preferences
Save configuration
Click "Save Config" to apply your changes
Clear cache
Flush the Magento cache to ensure the changes take effect
Product Indexing
To ensure your products are searchable through Wearly AI Search, you need to index your product catalog:
php bin/magento wearly:index:products
This command will send your product data to Wearly's AI Search service. You can schedule this command to run periodically to keep your search index up to date.
Theme Integration
The Wearly AI Search extension automatically replaces the default Magento search with AI-powered search. However, you can customize the search appearance by overriding the template files.
Custom Search Box
To customize the search box appearance, create the following file in your theme:
app/design/frontend/[Vendor]/[theme]/Wearly_AISearch/templates/search/form.phtml
Custom Results Page
To customize the search results page, create the following file in your theme:
app/design/frontend/[Vendor]/[theme]/Wearly_AISearch/templates/result/index.phtml
Advanced Configuration
Custom Attributes
You can configure which product attributes are indexed and used for search by editing the configuration in the admin panel or by modifying the etc/wearly_attributes.xml
file:
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Wearly_AISearch:etc/wearly_attributes.xsd">
<attributes>
<attribute code="name" weight="10" />
<attribute code="description" weight="5" />
<attribute code="short_description" weight="7" />
<attribute code="sku" weight="8" />
<attribute code="color" weight="6" />
<attribute code="size" weight="6" />
<!-- Add more attributes as needed -->
</attributes>
</config>
Search Behavior Configuration
Fine-tune the search behavior by adjusting these settings in the admin panel:
- Minimum Query Length - Set the minimum number of characters required to trigger a search
- Results Per Page - Configure how many products to display per page in search results
- Enable Search Suggestions - Toggle whether to show search suggestions as users type
- Enable Natural Language Processing - Enable or disable NLP features for more contextual search
- Style Focus - Configure whether to prioritize style matching in search results
Troubleshooting
Products Not Appearing in Search Results
- Ensure products are enabled and in stock
- Verify products are assigned to the correct store views
- Run the indexer again:
php bin/magento wearly:index:products
- Check the Magento logs for any indexing errors
API Connection Issues
- Verify your API credentials in the Wearly configuration
- Ensure your server can make outbound HTTPS connections
- Check your server's firewall settings
- Review the Magento system log for API-related errors
Search Box Not Displaying
- Ensure the module is enabled:
php bin/magento module:status
- Clear the Magento cache:
php bin/magento cache:flush
- Check if your theme overrides the search template
- Verify there are no JavaScript errors in the browser console
Frequently Asked Questions
Does this extension work with Magento 1?
No, the Wearly AI Search extension is only compatible with Magento 2.3.x and higher.
How often should I reindex my products?
We recommend setting up a cron job to reindex products daily or whenever products are updated. For stores with frequent inventory changes, consider more frequent indexing.
Can I use Wearly AI Search alongside other search extensions?
While technically possible, we recommend disabling other search extensions to avoid conflicts and ensure optimal performance.
Is this extension compatible with multi-store setups?
Yes, the Wearly AI Search extension supports Magento's multi-store functionality. You can configure different search settings for each store view.
Does this extension support multiple languages?
Yes, Wearly AI Search supports multiple languages. The search will automatically detect and process queries in the language of your store.