MiniVend Akopia Services

[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date ][Minivend by thread ]

UserTag



******    message to minivend-users from "Russ" <russ@khouse.org>     ******

Hello,

I'm trying to set things up so records can be added to a database through
minivend via a form.  One problem I am running into is ensuring a unique
'code' for each INSERT.  I am trying to write a UserTag to deal with this.
Below is what I'm trying to get to read a text file with the 'next code
number' in it.
I get an error when I try to start the catalog with this in the .cfg file,
about failing safe check:
Configuring catalog contact...UserTag 'getcode' subroutine failed safe
check: op
en trapped by operation mask at (eval 46) line 3, <CONFIG> chunk 1483.

In line 1483 of the configuration file 'catalog.cfg':
UserTag getcode Routine <<EOR

I'd also need a UserTag to update the number after a record has been
entered.  Any ideas?

<---THE TAG--->
UserTag getcode Routine <<EOR
sub {
        my ($number);
open (FILE,"< /home/minivend/catalogs/contact/products/codeindex.txt");
        $number = <FILE>;
close (FILE);
        return $number;
}
EOR
<---END THE TAG--->

Another problem I'm having is with <textarea> fields.  I want to use these,
and convert the endlines into <br>'s before entering it into the database.
The Input would be:

Hello.

This is a note.

and the output would be:
Hello.<br><br>This is a note.

I'm not sure where to start on that one.

Russ

-
To unsubscribe from the list, DO NOT REPLY to this message.  Instead, send
email with 'UNSUBSCRIBE minivend-users' in the body to Majordomo@minivend.com.
Archive of past messages: http://www.minivend.com/minivend/minivend-list


Search for: Match: Format: Sort by: