[ic] item_edit.html Can't setup new products!!!!

Chet Pressler chet@pressler.com
Sat, 17 Feb 2001 19:39:05 -0800


[root@www bin]# pwd
/usr/lib/interchange/bin
[root@www bin]# ./makecat

Select a short, mnemonic name for the catalog. This will be
used to set the defaults for naming the catalog, executable,
and directory, so you will have to type in this name frequently.

NOTE: This will be the name of 'vlink' or 'tlink', the link CGI
program. Depending on your CGI setup, it may also have the
extension .cgi added.

If you are doing the demo for the first time, you might use "construct".

Catalog name? demo
makecat -- Interchange catalog installation program.

*** We will be making a catalog named 'demo'. ***


If you are using the Apache or NCSA web server, Interchange can set
some of the default parameters for you by reading the file.

If you use the Netscape Enterprise server or other non-NCSA HTTP server,
enter 'none' -- the information, if any, will not be useful.


Try using the UP arrow at some of the prompts -- you have the
Term::ReadLine module installed, and Interchange may find some
default values in your HTTP server configuration file.  You can
cycle among them with the UP and DOWN arrows.

Enter path to httpd.conf file: /etc/httpd/conf/httpd.conf
######### BEGINNING CATALOG CONFIGURATION #########

During many of the following operations, defaults are placed in
a buffer for you.  You may use the up and down arrows to toggle
between the defaults.

If you made a mistake on a *previous* entry and realize that
in a later one, if you enter ONLY an @ sign and press return you
should be returned to the previous step.

# The server name, something like: www.company.com
#                                  www.company.com:8000
#                                  www.company.com/~yourname
#
Server name? www.yourname.com

# The type of demo catalog to use. The standard one distributed is:
#
#    construct
#
# If you have defined your own custom template catalog,
# you can enter its name.
#
# If you are new to Interchange and not a sophisticated web designer,
# use "construct" to start with.


DemoType? construct

# The type of permission structure for multiple user catalogs.
# Select M for each user in own group (with interchange user in group)
#        G for all users in group of interchange user
#        U for all catalogs owned by interchange user (must be catuser as well)
#
#        M is recommended, G works for most installations.


permtype? M

# The user name the Interchange server runs under on this machine. This
# should not be the same as the user that runs the HTTP server (i.e.
# NOT nobody).
#


InterchangeUser? interch

#
# The user name the catalog will be owned by.
#


CatUser? interch

# The group name the server-owned files should be set to.  This is
# only important if Interchange catalogs will be owned by multiple users
# and the group to be used is not the default for the catalog user.
#
# Normally this is left blank.
#


InterchangeGroup?

# The email address where orders for this catalog should go.
# To have a secure catalog, either this should be a local user name and
# not go over the Internet -- or use the PGP option.
#


MailOrderTo? admin@yourname.com

# Where the Interchange files for this catalog will go, pages,
# products, config and all.  This should not be in HTML document
# space! Usually a 'catalogs' directory below your home directory
# works well. Remember, you will want a test catalog and an online
# catalog.
#


CatRoot? /var/lib/interchange/demo

# The location of the normal CGI directory. This is a
# file path, not a script alias.
#
# If all of your CGI programs must end in .cgi, this is
# should be the same as your HTML directory.
#


CgiDir? /home/httpd/cgi-bin

# The URL location of the CGI program, without the http://
# or server name.
#
# http://www.virtual.com/cgi-bin/prog
#                       ^^^^^^^^^^^^^
#
# http://www.virtual.com/program.cgi
#                       ^^^^^^^^^^^^
#


CgiUrl? /cgi-bin/demo

#
# Additional URL locations for the CGI program, as with CgiUrl.
# This is used when calling the catalog from more than one place,
# perhaps because your secure server is not the same name as the
# non-secure one.
#
# http://www.secure.domain/secure-bin/prog
#                         ^^^^^^^^^^^^^^^^
#
# We set it to the name of the catalog by default to enable the
# internal HTTP server.
#


Aliases? /demo

# The base directory for HTML for this (possibly virtual) domain.
# This is a directory path name, not a URL -- it is your HTML
# directory.
#


DocumentRoot? /home/httpd/html

# Where the sample HTML files (not Interchange pages) should be installed.
# There is a difference. Usually a subdirectory of your HTML directory.
#


SampleHtml? /home/httpd/html/demo

# Where the image files should be copied. A directory path
# name, not a URL.
#


ImageDir? /home/httpd/html/demo/images

# The URL base for the sample images. Sets the ImageDir
# directive in the catalog configuration file. This is a URL
# fragment, not a directory or file name.
#
#         <IMG SRC="/construct/images/icon.gif">
#                   ^^^^^^^^^^^^^^^^^
#


ImageUrl? /demo/images

Interchange can use either UNIX- or internet-domain sockets.
Most ISPs would prefer UNIX mode, and it is more secure.

If you already have a program there, or use a common program
and the FullURL directive, select NONE. You will then need
to copy the program by hand or otherwise ensure its presence.

(You can use the up/down arrows to toggle).
INET or UNIX mode? UNIX
Do you use CGIWRAP or SUEXEC? n
Checking directories........................................mkdir 
/var/lib/interchange/demo
mkdir /home/httpd/html/demo
mkdir /home/httpd/html/demo/images
done.
Copying demo files..........................................found more to ask.

Your company name: ...............................Construct Something

Interchange has a workable internal database, but many things will
work better (and a few worse) if you use a SQL database. Interchange
can configure MySQL, PostgreSQL, and Oracle in a test configuration.

Set to 1 if you want to use MySQL, PostgreSQL, or Oracle: ..1

You can select this to use MySQL in your test catalog. Careful!
This requires the ability to create a database named "test_construct",
and is highly dependent on your Perl and MySQL configuration. Don't
be too surprised if this doesn't work.

Set to 1 if you want to use MySQL: ...............1
Database to use (will be created): ...............test_demo
DBI DSN to use: ..................................dbi:mysql:test_demo
Username for MySQL (if any): .....................
Password for MySQL (if any): .....................

We can try and use mysqladmin to create the database in
MySQL. In many default MySQL distributions, any user can create
a database beginning with "test".

Use the next option to add parameters. If your MySQL is password-protected
(and you know the password) you may want to add "-u root -p".

Set to 1 to create 'test_demo' with mysqladmin: ..1

To create the database you may need to supply a password and
username. To do that, add the option "-u USERNAME -p", where
USERNAME is a MySQL user with permission to create databases.
This is often the user "root".

Extra options for creation: ......................

You can use Interchange's companion configuration
interface, to do upload/download of files, manipulation of
the database, reconfiguration of the catalog, and much more.

To enable the UI, you will need a "super-user" account
name that has full access.

The initial password is "pass". CHANGE IT! You can do this
by going to the admin menu and selecting the superuser and
then "Change password".

Account name that will control this catalog: .....interchange
Administrative password: .........................pass

Found system commands to run.

Since you selected the MySQL option, you need to create
a database named "test_demo". In a default MySQL
configuration, any user may create and drop and modify
test_* databases, but some administrators disable this.

run "mysqladmin  create test_demo"? y
Database "test_demo" created.
done.
Moving link, /home/httpd/cgi-bin/demo exists, overwrite? ...y
done.
Copying share/ files to /home/httpd/html....................done.
Moving HTML files to /home/httpd/html/demo..................done.
Moving image files to /home/httpd/html/demo/images..........done.

Found additional system commands to run.

To enable image upload feature, you need to make a symbolic
link of the image base directory into your catalog directory.

run "ln -s /home/httpd/html/demo/images /var/lib/interchange/demo"? y
Add catalog to interchange.cfg? y

Done with installation. If my reading of your input is correct, you
should be able to access the demo catalog with the following URL:

         http://www.yourname.com/demo

In any case, you should get direct access at:

         http://www.yourname.com/cgi-bin/demo

That is, after you START or RESTART the Interchange server.  8-)
It is best done with:

         su -c "/usr/lib/interchange/bin/interchange -r" interch

For session expiration, you might want to place a line like this in your
crontab:

44 4 * * * /usr/lib/interchange/bin/expireall -r

It will prevent the session databases from getting too large.

[root@www bin]#

NOW Check that the database is created. However no tables are created until
after running /usr/sbin/interchange -r If you get a config error in this
command most likely the tables will not be created in the database. The
reasons I have found are the MySQL DBI connections are not working.
Trying reinstalling them

[root@www bin]# mysql

mysql> show databases;
+-------------+
| Database    |
+-------------+
| contact     |
| mysql       |
| samp_db     |
| test_demo   |
+-------------+
4 rows in set (0.00 sec)

mysql> quit

[root@www bin]# su - interch
[interch@www interchange]$ /usr/sbin/interchange -r

[interch@www interchange]$exit
[root@www bin]# mysql
[root@www bin]#
mysql> use test_demo
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> show tables;
+---------------------+
| Tables in test_demo |
+---------------------+
| affiliate           |
| area                |
| cat                 |
| country             |
| gift_certs          |
| inventory           |
| merchandising       |
| order_returns       |
| orderline           |
| pricing             |
| products            |
| recurring_items     |
| recurring_orders    |
| ship_addresses      |
| transactions        |
| userdb              |
+---------------------+
16 rows in set (0.00 sec)

mysql> quit
[interch@www bin]$

At this point you should be up and running. If you run this again you may 
need to drop the database
use
#mysqladmin drop test_demo -f



At 01:12 AM 2/18/01 +0000, you wrote:
>I'm sorry, I am new at this. I have tried to install mySQL database under 
>tables and Database. I tell it that mySQL and (mydatabase) but everytime I 
>login it says "You need either GDBM_File or DB_File for Interchange to 
>work as documented." Is this where you tell it what your database is? Is 
>there a step I missed?
>
>
>>From: Chet Pressler <chet@pressler.com>
>>Reply-To: interchange-users@lists.akopia.com
>>To: interchange-users@lists.akopia.com
>>Subject: Re: [ic] item_edit.html Can't setup new products!!!!
>>Date: Fri, 16 Feb 2001 13:13:19 -0800
>>
>>
>>I wanted to add a manufacturer to my products so I did the following
>>
>>1) Add column in database product table
>>
>># mysql
>>mysql> use <my dbase name> ( fill in if you are using a database)
>>mysql> ALTER products ADD mfg VARCHAR(20);
>>mysql> quit
>>
>>2) Modify variable.txt. I added the mfg field after weight
>>
>>UI_ITEM_FIELDS  sku description category price image display comment size
>>color weight mfg      Item display
>>
>>3) Add New Entry into mv_metadata ( via Admin Tables interface)
>>
>>Name                    Type    Width   Label
>>products:mfg            Text    30      Manufacturer
>>
>>I did not have to move or change the item_edit.html to the pages/admin
>>directory in my catalog
>>
>>The next time I did an item edit the field was available to change. After
>>saving the database show the value in the row.
>>
>>Hope this sheds some light.
>>
>>
>>
>>At 04:32 PM 2/16/01 +0000, you wrote:
>>>Okay I did that but I still don't get anything. All that I have is this:
>>>Is this all I am supposed to have and I have to create my own page?
>>>Does anyone have a copy of one they made? I would really appreciate it.
>>>
>>>
>>>[calc]
>>>         $CGI->{mv_data_table} = $Config->{ProductFiles}[0];
>>>         if ($CGI->{item_id} eq 'new') {
>>>                 $CGI->{ui_new_item} = 1;
>>>         }
>>>         else {
>>>                 $CGI->{ui_hide_key} = 1 unless $CGI->{item_id} eq 'new';
>>>         }
>>>         if(! $CGI->{ui_data_fields}) {
>>>                 $CGI->{ui_data_fields} = $Variable->{UI_ITEM_FIELDS}
>>>                                 || 'sku description category comment
>>>price image weight size color';
>>>         }
>>>         if(! $CGI->{ui_break_before}) {
>>>                 $CGI->{ui_break_before} = $Variable->{UI_ITEM_BREAK}
>>>                                 || 'image size';
>>>         }
>>>         my @args = (
>>>                 '__UI_BASE__/item',
>>>                 "item_id_left=$CGI->{item_id_left}",
>>>                 "ui_sequence_edit=$CGI->{ui_sequence_edit}",
>>>         );
>>>         $CGI->{ui_return_to} = join "\0", @args;
>>>         return;
>>>[/calc]
>>>[if cgi ui_new_item]
>>>         [calc]
>>>                 $CGI->{item_id} = q{[counter
>>>file="__UI_PRODUCT_DIR__/__UI_PRODUCT_DIR__.autonumber" start=new0000]};
>>>                 return;
>>>         [/calc]
>>>[/if]
>>>@_UI_STD_DBEDIT_HEAD_@
>>>
>>>[seti page_title]Item editor: [cgi item_id][/seti]
>>>[seti page_banner]Item editor: edit item <B>[cgi item_id]</B>[/seti]
>>>[set help_name]edit.item[/set]
>>>[set icon_name]admin/icon_item.gif[/set]
>>>
>>>@_UI_STD_HEAD_@
>>><P>
>>>@_UI_STD_DBEDIT_TABLE_@
>>>
>>>[if-mm super]
>>><A HREF="[area href=admin/flex_editor
>>>                                 form='
>>>                                         item_id=[cgi item_id]
>>>
>>>mv_data_table=__UI_PRODUCT_TABLE__
>>>                                         page_title=Edit items: [cgi 
>>> item_id]
>>>                                         help_name=inventory.edit
>>>                                         ui_no_meta_display=1
>>>                                         ui_hide_key=1
>>>                                         ui_return_to=__UI_BASE__/item
>>>                                         icon_name=admin/icon_item.gif
>>>                                         ']">No meta display</A>
>>>[/if-mm]
>>>
>>>@_UI_STD_FOOTER_@
>>><!-- page: @@MV_PAGE@@ -->
>>>
>>>
>>>
>>>>From: "Cameron Germein" <cameron.germein@team.eftel.com>
>>>>Reply-To: interchange-users@lists.akopia.com
>>>>To: <interchange-users@lists.akopia.com>
>>>>Subject: Re: [ic] item_edit.html  Can't setup new products!!!!
>>>>Date: Fri, 16 Feb 2001 11:04:41 +0800
>>>>
>>>>i bet the fields in your product database are different from those in the
>>>>demo, right? if so, make a directory in your pages dir called "admin", and
>>>>copy from interchange/lib/UI/pages/admin the item_edit.html page into your
>>>>new admin directory. edit the new copy in there.
>>>>
>>>>----- Original Message -----
>>>>From: Bill Jenkins <billjenkins@hotmail.com>
>>>>To: <interchange-users@lists.akopia.com>
>>>>Sent: Friday, February 16, 2001 12:48 AM
>>>>Subject: [ic] item_edit.html Can't setup new products!!!!
>>>>
>>>>
>>>> > Does anyone have a template for this. When I click on add new item, 
>>>> I get
>>>>a
>>>> > almost blank screen. When you are in akopia's demo page you have a nice
>>>> > layout of the item name, description, image, price. My version does not
>>>>have
>>>> > that. Does anyone have it? How can I go about setting up one? I would
>>>> > appreciate any help about this.
>>>> > _________________________________________________________________
>>>> > Get your FREE download of MSN Explorer at http://explorer.msn.com
>>>> >
>>>> >
>>>> > _______________________________________________
>>>> > Interchange-users mailing list
>>>> > Interchange-users@lists.akopia.com
>>>> > http://lists.akopia.com/mailman/listinfo/interchange-users
>>>> >
>>>>
>>>>
>>>>_______________________________________________
>>>>Interchange-users mailing list
>>>>Interchange-users@lists.akopia.com
>>>>http://lists.akopia.com/mailman/listinfo/interchange-users
>>>
>>>_________________________________________________________________
>>>Get your FREE download of MSN Explorer at http://explorer.msn.com
>>>
>>>
>>>_______________________________________________
>>>Interchange-users mailing list
>>>Interchange-users@lists.akopia.com
>>>http://lists.akopia.com/mailman/listinfo/interchange-users
>>
>>
>>_______________________________________________
>>Interchange-users mailing list
>>Interchange-users@lists.akopia.com
>>http://lists.akopia.com/mailman/listinfo/interchange-users
>
>_________________________________________________________________
>Get your FREE download of MSN Explorer at http://explorer.msn.com
>
>
>_______________________________________________
>Interchange-users mailing list
>Interchange-users@lists.akopia.com
>http://lists.akopia.com/mailman/listinfo/interchange-users


Chet Pressler
Pressler Inc.  Video Systems Specialists http://www.pressler.com/
8170 S. Eastern Avenue, Suite 196, Las Vegas, NV 89123
950 Comstock Street, Santa Clara CA 95054
702-616-3760 Voice
801-383-3908 FAX
702-493-6098 Cell (pager e-mail 7024936098@mobile.att.net)

email - chet@pressler.com