Joanna Kane
posted this on May 06, 2010 18:21
This document gives instructions on installing and using this module for Miva Merchant shopping-cart systems. This document applies to module version 1.12 for Miva Merchant version 5.x, released May 2010. The module will only work with Miva Merchant 5.x and up. Merchants on 4.x will not be able to use our module.
You can download the free module from Miva Central (www.mivacentral.com) if you search for SingleFeed.
Table of Contents
Please note - the module does not automatically generate a new data feed for SingleFeed each night, you will have to click the EXPORT button each time they want to update their feed. Or you can setup a CRON script that would automatically run the feed generation nightly; merchants should ask their developer or hosting provider to do this.
Merchant Help
If you need assistance with the installation, Kent at The Magic M can provide module install service for $40 per store. His contact info is below:
Kent Multer
Magic Metal Productions
Introduction
Welcome to SingleFeed! SingleFeed's Miva module will make it easy for you to access SingleFeed services with just a few clicks of your mouse.
Customer advisory
Upon installation, the module will automatically modify the store's page templates and "Item" settings, in order to put tracking codes on the pages. However, if your pages have already been edited or customized, it's possible that the module will not be able to edit the templates. In that case, the module will display warning messages during installation. If you see these messages, and you want to use tracking codes, you will need to manually edit some page templates. Instructions for this are included in the section on Page templates below. If you need more assistance, consult your hoster or Miva representative.
The module exports product data into a file on your site, and SingleFeed retrieves it from that location. After installing the module, you will need to enter the name or path of this folder; and you will need to ensure that the folder's permission settings will allow SingleFeed to read it. This is described in more detail below in the section on Initial setup. If the folder location and permissions are not set up properly, SingleFeed will be unable to retrieve your product data. If necessary, consult your hoster or Miva representative for help with this.
Installation
The procedure for installing this module is the usual one for Miva Merchant modules: add the module to the site, and assign it to the store. The procedure is explained below in a bit more detail. If you need more information, see your Miva representative or documentation.
To install the module in your Miva domain or "mall," follow the steps below:
After the module is installed, you need to assign it to your store.
Initial setup
After installing the module, there are a few settings you need to enter.
All these settings are explained in detail below. After the above steps are completed, please read the descriptions of the other settings, and adjust them as needed to best suit your store.
Page templates
In order to place tracking codes on your store pages, the module requires <mvt:item> tags to be placed on the templates for the Product Detail (PROD) and Invoice (INVC) pages. Upon installation, the module attempts to automatically insert these tags into the page templates. However, if your pages have been customized, the module may be unable to insert the tags. Also, if you use a page-template module that provides many different templates for Product Detail pages, the module cannot modify these additional templates; you will need to insert the <mvt:item> tag manually.
The specific tags that are used are:
The best location for these tags is near the bottom of the page, but inside the HTML body element, i.e. before the </body> tag. If you need more help editing the templates, consult your hosting company or Miva representative.
Module settings
This module has two admin pages: one for exporting product data, and another for tracking codes.
The various settings on each page are described below.
Export settings
This page displays controls how you export your product data to SingleFeed. The upper section has a number of settings and an Export button that generates the data file. The lower section has a set of dropdown menus for data field assignments.

Output file path
Enter the folder and file name for the exported file. The file must be placed in your site's Miva script folder, or in a sub-folder of it. In most sites, the Miva scripts folder is your main home-page folder, which is often named public_html or www. However, the exact location of this folder will depend on your site's configuration. You may wish to create a sub-folder for the exported file. For instance, if you create a folder named singlefeed, and you want the exported file to be named products.csv, then the setting in the text box will be singlefeed/products.csv.
If you create a subfolder or directory for the file to be placed in, you will need to set the file folder/directory permissions to write enable.
The folder that contains the exported file must have its permissions set so that SingleFeed will be able to read the file. If necessary, consult your hoster for help choosing and creating this folder.
You will need to write down the full file path (http://www.mydomain.com/..../singlefeed.csv) to supply to SingleFeed on the Products page of your account. To setup http import please read our article on Import Methods.
Export button
Clicking this button causes the module to export the data on your store's products to the output file. If an older file exists from a previous export, it will be overwritten (the old data will be deleted).
Note: the module will only export data on active products. Inactive products can't be purchased or even viewed in the store, so exporting this data could be misleading to your customers.
Time limit
Your Miva store has a "global" time limit, which is set by your hosting company. Any store or module function that attempts to run longer than this will be terminated with a timeout error message. If your store has a large number of products, the module can interrupt itself and restart, in order to export all the products without timing out.
The module's time-limit setting controls how long the module will export products before it interrupts itself. This setting should be as large as possible, but slightly less than the global time limit set by the hoster. Upon installation, the module sets its limit to be five seconds shorter than the global timeout. Most stores will not need to adjust this setting. If your store has an extremely large number of products, you may need to reduce this setting somewhat, in order to allow more time at the end of the export for final "clean-up" operations.
Tip: If necessary, you can ask your hoster to increase your global timeout. Some hosters set this quite short, as a safeguard against "runaway" scripts. They may be willing to increase it when a user has a specific need.
Query size
When doing an export, the module reads product data from your store's database in large sets. If the module reads the data one product at a time, or in small sets, the export will take longer. But if the module reads too many products in one set, the data will fill up the available memory. This, too, can cause the export to run slowly, or even to fail.
Upon installation, the module sets a query size of 1000. Most stores will not need to adjust this setting. If your exports take too long, you may try raising the query size. If your products generate large amounts of data (long descriptions, lots of custom fields, etc.), you may need to reduce the size.
Inventory tracking
This menu selects how the module exports inventory status (In or Out of stock) for your products. The module is compatible with the Miva built-in inventory system, and also with the Inventory Manager module from Viking Coders. You also have a "None" setting, which causes the module to not export any inventory data. However, SingleFeed recommends that you export this information, to keep your listings as complete and up-to-date as possible.
Default field values
The module provides default values for some of the fields in the exported file. These settings will be used for any product that does not have some other data available. If you assign a source for any of these fields (using the field-assignment menus explained below), then the assigned source will be used for each product; but if the source is empty, the module will export the default value instead. If you don't assign sources to any of these fields, the module will use the default value for all products.
Tip: Some fields are not required, but are highly recommended because they increase the value of the listings to your customers. The default value settings provide a convenient way for you to make sure that these fields have a value, even if you don't have data for them elsewhere in your store.
Field assignments

The module provides a dropdown menu for each of the data fields in the exported file. You can use these menus to select where the module gets the data that it places in each field. Some of the fields are required: they must contain some data for every product that you export. These fields are highlighted in the list.
Each dropdown menu lists all the possible locations from which the module can read the data that it exports. There are three types of data sources:
For some fields, the module pre-selects a data source when it is installed. For the other fields, if they are required, you must either select a data source or enter a default value. Many of the fields are optional; but it's recommended to supply sources for as many as possible, to maximize the value of your product listings.
Tracking-code settings
This page has settings that control the use of SingleFeed tracking codes to monitor activity in your store.
If you have trouble getting tracking codes to work, there may be a problem with your page templates. Review the section on Page templates above, and check your templates to ensure that the <mvt:item> tags are properly installed.

Enable
This checkbox turns the tracking-code functions on or off. This allows you to control the codes without editing your page templates.
Account ID
Enter the SingleFeed account ID that was assigned to you when you signed up. This number is available on the Profile page of your SingleFeed account.