Edit More
Copyright © 2000, William Weiland
Overview
The edit more module allows you to edit additional field data in your product database from the individual product editing screen. This module requires that you have already added the additional fields to your products database with a dBaseIII plus compatible editor. You should not do this unless you are thoroughly familiar with database management and editing.
Initial Setup
Use the Merchant admin upload feature to upload the module. Once uploaded, click the Add button to add it to the mall/domain.

In admin, under your store, click on the link for Utilities Configuration Screen. Assign the module and Update it to install it in your store.

You must already have added the additional fields to your products database using a 100% dBaseIII plus editor. Be sure to make a backup of your products.dbf and products.dbt before you do it. If you don't have an editor, we have a free utility that will do it at http://www.emporiumplus.com/download/newfield.zip

After the fields have been added, click on the image to the left of the store Utilities.

Click on the Edit More link and run the routine that generates the product field list.


Usage
From the individual product edit screen you can select the Additional Fields tab and enter the data you want in each of the additional fields.
Optional Files
Showmore - Displays additional field data when installed into the OpenUI. The showmore module is edited to conform to your additional field names. Near the end of the showmore.mv file, you'll see a function called OUI_Extension2. Within that function you'll see an example of one field named itemsize. Use that example and write your code for each of the fields you want to display.

Prodmore - Prodmore is not a module. It is a standalone applet. Do not try to install it into Merchant. Rather, FTP it to the Merchant2 directory or other directory on your server. It is run as a program, e.g. http://www.yourdomain.com/Merchant2/prodmore.mv It is a mass pre-load program to get you up and running with additional field data. When not in use it should be deleted from your server as its usage is not password protected. Anybody could run it. So delete when not in use. After your initial pre-load of data, you should use the edit more module, which is password protected. To use prodmore, you will need to edit the prodmore.mv file according to the comments section of the prodmore.mv file.


Usage
If you are individually adding new records to the product file through the admin interface you need to add code to blank out a new record before it is added. Otherwise, data from a previous record will be inserted into fields which were not provided new data. This edit is not necessary if your method of adding product records is by product import from flat file followed by the use of the prodmore (referenced above) to import additional field data from a flat file. If this edit is needed, in the /lib/db.mv find the function below. Just after the Open_Products line, add the 10 lines shown.
<MvFUNCTION NAME = "Product_Insert" PARAMETERS = "code, name, thumbnail, image, price, cost, desc, weight, taxable, active" STANDARDOUTPUTLEVEL = "">
<MvASSIGN NAME = "l.product_id" VALUE = 0>
<MvIF EXPR = "{ _DB_Store_Open_Products() }">
<MvIF EXPR = "{NOT fexists(g._DB_Store_Directory$'prodstru.dbf')}">
<MvPRIMARY NAME = "Products" INDEX = "{ g._DB_Store_Directory $ 'prd_id.mvx' }">
<MvREVEALSTRUCTURE DATABASE="{ g._DB_Store_Directory $ 'prodstru.dbf' }">
</MvIF>
<MvOPEN NAME="structure" DATABASE="{ g._DB_Store_Directory $ 'prodstru.dbf' }">
<MvWHILE EXPR = "{NOT structure.d.eof}">
<MvASSIGN NAME="Products.d.&[structure.d.field_name]" VALUE="">
<MvSKIP NAME="structure">
</MvWHILE>
<MvCLOSE NAME="structure">