Data Feed Plugin
In this article you will find:
Overview
This document describes the process of installing the Magento Plugin on community or Enterprise version of Magento. The plugin will help you get your site up and running with Hawksearch. Hawksearch is a SaaS application that offers advanced search capabilities to e-commerce and publishing websites. Hawksearch has been installed on a number of e-commerce websites that are built on Magento Platform (Community & Enterprise).
The document will describe in detail the process of installing the plugin on your Magento (community or enterprise version) instance and get Hawksearch up and running on your ecommerce site.
NOTE: These plugins work with the following versions of the Magento Platform.
- Magento Community (1.6 CE – 1.9 CE)
- Magento Enterprise (1.11 EE – 1.14 EE)
There are currently two separate Magento Extensions available for Hawk. These two extensions can be installed separately and can work independently.
- Hawksearch Data Export: This plugin will allow you to set up the data feeds for Hawksearch export. These feeds will conform to the guidelines provided in the Hawksearch Data Feed Guidelines.
NOTE: For additional details regarding the files and file formats please reference the Data Feed Guidelines document - Hawksearch Proxy Hybrid Integration (front end): This plugin will allow you to set up the search page on your Magento site using the Proxy Hybrid integration method. This will cover installation of the search ahead feature on the search textbox as well as the search page.
NOTE: Please reference the Hawksearch- Hybrid Proxy Integration guide for additional details regarding the Hybrid Proxy implementation
Installing the Plugin
NOTE: The plugin is not currently available in the Magento market place. Please talk to your sales representative on Hawksearch for receiving the code for the plugin.
There are two ways of installing the Magento plugin
- Using the "Magento Connect Manager"
- Manual Installation – Copying the files directly on your Magento Server
Using the "Magento Connect Manager"
USING THE MAGENTO CONNECT MANAGER
Step 1: Login to your Magento Backend and click on the System tab on the top navigation. You should see the Magento Connect link on the menu. Mouse over it and click on the Magento Connect Manager as shown in screenshot below.
Step 2: You will be required to login again. Please enter your admin credentials for the "Magento Connect Manager" login.
NOTE: You will be required to have full administration privileges for your Magento account to download this plugin.
Step 3: Once authorized you will then be taken to the Magento Connect Manager page as shown in screenshot below. This is where you will need to upload the compressed file (with .tgz extension) provided to you by your Hawksearch Project Manager.
For installing the Data Feed Generation plugin please use the "Hawksearch_Datafeed-..*.tgz" file.
Step 4: If everything has been installed successfully and you do not run into any issues you should see a message clarifying that the package was installed successfully on the Magento Instance.
Package installed: community Hawksearch_Datafeed 0.1.0Cleaning cache..
Cache cleaned successfully
NOTE: If you see any errors installing the plugin please reach out to your Hawksearch Project Manager or email customerservice@hawksearch.com
Manual installation
If you do not wish to use the Magento Connect Manager, you can install the module manually with the following steps:
- Backup your store database and web directory
- Disable compilation if enabled.
- Unzip the data feed plugin on your computer. Your Hawksearch account manager will provide you with the Hawksearch_Datafeed-[version].tgz file.
- Use your FTP client to upload the "app" and "hawksearch" directories from the unzipped module to your store root.
- Logout and Login again from the Magento admin (to clear the ACL).
- Refresh your magneto cache.
- Re-enable compilation if desired.
Configuration
This section allows you to initialize and control the settings of how the data feed plugin is configured in your Magento environment. In this section you will control the following settings:
- Error Handling Settings
- Data Feed Attribute Settings
- Cron Settings for generating feeds on a schedule
General
On landing on the default configuration page you should now see the Hawksearch Configuration options on the Left Navigation area. Depending on plugins installed (Data Export, Hybrid Proxy or both) you will see one or both of the options under the Hawksearch area.
- Activation: The enabled field indicates if the plugin has been enabled on the site.
- Logging: This setting controlled by the "Enable Logging" field indicates if the error logging has been currently enabled on the plugin.
- Version number: The version number indicates the current version number of the plugin you are using.
Feed Settings
For accessing the data feed configuration section please click on the Data Feed Settings link as shown above. You should now be able to access and modify the Data Feed configuration settings. You can make any changes to this section and then use the "Save Config" button on the screen to save your changes.
Generate Feed
This button allows you to generate the feed on demand. Once clicked a message will appear letting know the feed is generating.
Feed Stores
This is the list of the sites that is currently installed on your Magento instance. Select the site(s) you need to generate the feeds for.
Batch Limit
This setting controls the number of records selected in a single batch by the query when adding records to the feed.
Allow Out of Stock Items
This setting allows you to select if the out of stock items should be added to the feed.
Allow Disabled Items
This setting allows you to select if the disabled items should be included in the feed.
Enable Datafeed Cron task
This setting controls if the cron is enabled to run the feeds on a scheduled basis
Cron Expression
This setting allows you to specify the cron expression to control the schedule for generating the feeds. Enter a standard 5 part cron expression. See https://en.wikipedia.org/wiki/Cron for more information about cron expressions. Note that the job cannot be scheduled to run more frequently than hourly (sample expression to run daily at 2 AM: 0 2 * * *).
Feed Cron Email
This setting allows you to specify an email address that an email should go out to, once the feed has been generated successfully.
Image Cache
This section allows you to control the setting for the image cache generation process. If you are using Hawksearch auto suggest or the Hawksearch JavaScript implementation for front end integration, the image cache generation process helps generate images in the sizes needed by the auto suggest. Note that the Hawksearch image cache generation tool uses the "Small Image" as the source image for generating the cache. If your products do not have a small image assigned, a place holder image will be used.
Generate Image Cache
This button is used to generate the image cache on demand. Once clicked you will see a message that indicates the image cache generation process has started and specifying the number of images that will be generated on the cache
Image Width
This setting controls the width dimension to use for the thumbnail image. This setting is required for generating the image cache
Image Height
This setting controls the height dimension to use for the thumbnail image. This setting is NOT required. If the value is not specified the same dimension that is used for the width of the image will be used for the height of the image.
Enable Imagecache Cron
This setting is used to control if the image cache generation cron is enabled to generate images on the scheduled basis
Cron Expression
If the imagecache cron is enabled. This setting is used to specify the cron expression to specify the schedule for generating the image cache.
Imagecache Cron Email
This setting allows you to specify an email address that an email should go out to, once the image cache generation has been completed successfully.
Usage
If the plugin has been installed successfully on your Magento instance you will now begin to see corresponding sections in your Magento backend. To access the configuration for the Hawksearch, please login to your Magento admin and click on the System Tab. Under System please click on the "Configuration tab" as shown in screenshot below
Specifying Searchable Attributes
The Hawksearch data feed tool respects your Magento settings for searchable attributes. In order to include an attribute in the data feed, select the attribute you wish to export from "Manage Attributes". Under the "Frontend Properties" tab, set the "Use in Quick Search" value to "Yes" and save the attribute. Regenerate the data feed from the Hawksearch Data Feed configuration page.
On Demand Feed and Image Cache Generation
If you need to generate the feeds or the image cache "On Demand", you can use the "Generate Feed" button under the "Feed configuration" section or the "Generate Image Cache" button specified under the "Image Cache Generation" section specified above. The feeds are generated in the hawksearch/feeds folder outside your var directory. The hawksearch/feeds folder will contain a sub directory for each store view selected in the "Feed Stores" configuration item. The list of all folders will be provided in the hawksearchfeedsummary.json file located in the hawksearch/feeds directory
For both feed generation and image cache generation, as soon as the button is clicked a lock file is placed inside the hawksearch/feeds directory. This prevents a second process from being kicked off and running at the same time. Once the button is clicked the feed file generation process begins. Once the process finishes the lock file will be removed. Note that the image cache and feed generation must be run separately and cannot be run concurrently.
Cron Job Feed and Image Cache Generation
The Hawksearch data feed and image cache generation cron jobs utilize the standard Magento cron system. Make sure to flush the Magento cache after saving changes to the cron settings when testing.