|
|
|
Netfirms 24/7 Support
.: E-COMMERCE
.: Netfirms Commerce Pro
.: How can I quickly update my products in Netfirms Commerce Pro without having to add each individual product, category, price, and feature?
|
How can I quickly update my products in Netfirms Commerce Pro without having to add each individual product, category, price, and feature?
EasyPopulate
(EP) lets you quickly populate and update thousands of products in many
categories for a Netfirms Commerce Pro store with data from an:
Excel spreadsheet OpenOffice spreasheet Filemaker database Access database Any delimited text file (you can now set a config var for the separator character)
Description of Easy Populate: When you upload a file, this is what EP does:
1.
Breaks the file into lines based on the explicit field named "EOREOR".
This word "EOREOR" must appear in the last field in each row of your
data, or EP won't work. 2. Reads the first row to get the names of the fields you are importing. This is why you must have the header row in the file. 3. Checks to see if there is a valid product_model in the row, if it's not there, throw an error and go on to the next row 4.
Checks to see that the product_model is not too long. Stock OSC comes
with just 12 characters available for the product_model. If you need
more than 12, change your database and edit easypopulate.php and change the configuration variable $modelsize. If it is not the right size, the import stops right then. 5.
If the product_model does not exist in the database, the product is
created with the given information price, weight, qty). If it does
exist, then the given information is updated. 6.
Checks to see if the category(ies) given exist in the database. If they
do, it puts the product in to that category/subcategory. If they do not
exist, it creates the category/subcategories as needed, and then puts
the product into that category/subcategory.
Other features: Supports Froogle export format Supports multiple languages (admin also) Creates Categories and Manufacturers on the fly Unlimited levels of categories/subcategories are supported. Products without pictures can be defaulted to a standard "no picture available" image. Upload a file via browser or grab a file from the temp directory. Attributes support
Requirements: -You must have familiarity with HTML and PHP coding as well as understanding of database structure (eg. mySQL). -
EasyPopulate requires the use of the product_model field (model
number). It won't work without the model number. The model numbers you
assign must be unique, i.e. you can't give all your products a
product_model of "test". -
Remember that any of those separator characters anywhere in your data
will cause EP to think that's another column of data! It set as Tab
Seperated Values as default. - Each EP file must have the header row in place, otherwise your first row of data will be skipped. -
If you set the quantity of an item to zero, EP will automatically make
the item Inactive in the database. To change the behaviour, see the
Configuration Variables section within the easypopulate.php file. - For dates, use this format and you'll avoid problems: YYYY-MM-DD. -
Also, be aware that backslashes can confuse EP and the database because
the backslash character is the escape character for strings in mysql.
Instructions: 1. Browse to: http://oscommerce.sunsite.dk/contributions/EasyPopulate2.72_1.zip to download the easypopulate contribution
2.
Create directory a temp directory in ../catalog/. The ../catalog/temp/
directory needs to have permissions set so that EP can read and write
files there. Therefore the permissions should be set to 755 (most FTP
tools such as Filezilla will allow you to set file
attributes/permissions).
3. Copy files:
/catalog/admin/easypopulate.php and /catalog/admin/easypopulate_functions.php should be uploaded to ../catalog/admin/
/catalog/admin/includes/languages/english/easypopulate.php should be uploaded to ../catalog/admin/include/languages/english/
/catalog/admin/includes/languages/espanol/easypopulate.php should be uploaded to ../catalog/admin/include/languages/espanol/
4.
For adding a link to the Commerce Pro Administration Panel, edit file
../admin/includes/boxes/catalog.php by adding the following line of
coding:

After:

NOTE: Other configuration changes can be made but are not required.
5.
Make the following changes within ../catalog/admin/easypopulate.php:
$tempdir and $tempdir2 should point to the path of your catalog temp
folder. For example if you created a temp directory in ../catalog then
$tempdir and $tempdir2 should read as follows:
$tempdir = "temp/"; $tempdir2 = temp/";
NOTE: other changes can be made but are not required.
Instructions to Access to Easy Populate:
1. Login to the Members Control Panel at https://controlpanel.netfirms.com 2. Click Applications 3. Click Commerce Pro 4. For the store you wish to administer, click the corresponding Admin link to login to the Commerce Pro Admin Panel 5. Click Catalog 6. Click Easy Populate 7. Click one of the links at the bottom of the box marked "Download a txt file to edit" and save the tab-delimited txt file to your local machine. 8. Edit the file in Excel or OpenOffice. 9. After you are done editing, save the file: Excel users: as a "Text (tab delimited)" file from Excel OpenOffice users: as a "Text" file, check the "edit MORE HERE"
***NOTE:*** This is a list of the fields that must exist (otherwise your shopping cart will not load to the browser): v_products_model v_products_image v_products_name_1 v_products_description_1 v_products_url_1 v_products_price v_products_weight v_date_avail v_date_added v_products_quantity v_manufacturers_name v_categories_name_1 v_categories_name_2 v_categories_name_3 v_categories_name_4 v_categories_name_5 v_tax_class_title v_status - this field should be populated with "Active" EOREOR - this field should be populated with "EOREOR"
10.
Place the file in the $tempdir and then place the filename in the box
under "Upload from Temp dir" and click Insert Into Database. Remember
the file must be
readable by the username that the web server is running as. You might
have to chmod 755 the uploaded file to let the script read it.
SPECIAL INSTRUCTIONS FOR LARGE STORES If
your store has over 300 products, you may run into PHP timeout issues.
as the maximum time that a script can run is currently set to 30
seconds on the Netfirms Hosting Plans (consistent with Industry
standard). If your store is over 300 items, you must split the file
before it can be uploaded. You can do this by hand, or you can use the
file-splitting feature of EP. If you split by hand remember that EP
expects the first row in every file to be the headers, and will throw
this line out. So if you don't have headers, it's going to throw out
the first row of data.
To split a file with EP: 1. Go to Admin -> Catalog -> Easy Populate 2. Click the lower browse button and get the file you want to split. 3. Click the button named "Upload and Split file". 4.
The file will be split into sections, each with 300 products, the last
one being shorter as needed. These files will be located in the
catalog/temp directory. 5.
You can download these files using Commerce Pro's File Manager tool
under Admin -> Tools -> File Manager, or you can use your ftp
client (eg. Filezilla) to download them. 6.
Upload each split file independently in the normal way described above.
These new files will be saved in the /catalog/temp directory, and will
be named like this: EP_Split1.txt, EP_Split2.txt, etc.
IMPORTANT:
If these files are still to large, edit easypopulate and change the
configuration variable $maxrecs to a smaller number. This controls how
many records are put into a single file when you split it.
SPECIAL INSTRUCTIONS FOR MAC USERS Because
of the differences in the end-of-line characters used by Apple's
operating systems, after editing and saving the tab-delimited file,
you'll need to open the file in BBedit or equivalent and change the
line endings to "Unix".NOTE: Contributions are provided by the community in the form of
project add-ons, feature updates, language packs, and extended modules. Support
for the contributions are not provided; however you may post questions
to the oscommerce forum at: http://forums.oscommerce.com/
|
|
Article
|
184
|
|
Created
|
4-28-2005
|
|
Modified
|
9-20-2008
|
|
Author
|
Netfirms
|
|
|
|
|