Akopia Akopia Services

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

RE: [mv] New user Account / Quote Number



******    message to minivend-users from Cameron Prince <PRINCECB@novachem.com>     ******

Ven,

I completed the quotation number support for my catalog and maybe you can
use it to help you with the id number you need.

Here's the global sub from minivend.cfg: (DITCHED USING ARRAYS)

GlobalSub <<EOF
sub QuoteNumber {
my $quote_log = '/path/to/quote.number';
   
open(QUOTENUM,"<$quote_log");
my $prev_quote_num = <QUOTENUM>;
close(QUOTENUM);
   
my $new_quote_num = $prev_quote_num + 1;
   
open(QUOTENUM,">$quote_log");          
print QUOTENUM ($new_quote_num); 
close(QUOTENUM);    

$Vend::Session->{scratch}->{quote_num} = $new_quote_num;
return "";
}  
EOF


And the code on the basket page:


[if scratch quote_num]
<INPUT TYPE=hidden NAME=quote_number VALUE="[scratch quote_num]">
[else]
[perl arg=sub interpolate=1]QuoteNumber('')[/perl]
[/else]
[/if]


So the way this works is if the visitor adds a service to the basket and
hasn't been to the basket before, a new quote number is generated.
(Incremented once)

He can continue to add things to the basket within the same session and the
number doesn't increment.

He can save, email or process the quote and the quote number is then added
to a field in userdb.


Good luck,


Cameron






 -----Original Message-----
From: 	owner-minivend-users@minivend.com
[mailto:owner-minivend-users@minivend.com]  On Behalf Of Cameron Prince
Sent:	Monday, May 22, 2000 8:14 AM
To:	'minivend-users@minivend.com'
Subject:	RE: [mv] New user Account

******    message to minivend-users from Cameron Prince
<PRINCECB@novachem.com>     ******

Vic,

This is essentially what I am trying to do, except in my case it's a quote
number.

I have perl code that reads a file, increments the number by one, then
inserts it into the session.

However, the code is failing to run as a global sub due to a problem using
arrays. (I posted this problem last night)

If I get a reply that shows me how to get around the array problem, I'll
share the complete code. Otherwise, I guess I'll run the code as an external
script and I'll share that with you as well.

I plan to have this going by tonight, so I'll let you know later,


Cameron

 -----Original Message-----
From: 	owner-minivend-users@minivend.com
[mailto:owner-minivend-users@minivend.com]  On Behalf Of Victor Nolton
Sent:	Monday, May 22, 2000 4:08 AM
To:	minivend-users@minivend.com
Subject:	[mv] New user Account

******    message to minivend-users from Victor Nolton <venom@inna.net>
******


A client wants each new customer to be assigned a unique id number. this
number would be the number for the 'code' field of the database. 
I need to figure out a way to read the database and find the last
number in the database and of course add one to it. Just concerned about
duplicate numbers. Of course the user will NOT know this number, but they
still want the user to enter a username/id, and of course be able to call
up the account information based on that name and of course a password.

It is my understanding they want a database of people with numbers/codes 
like 168011 168012 168013...

Has anyone done this before or am I totally wording this in a way noone
can understand.

Ven

Ven's News (Bookmark It) : http://www.vensnews.com

Ven (ven@lordsofacid.com) _________________ http://ven.lordsofacid.com __
AOL: WebmstrVen     Praga Khan's Official Website        ICQ: 8321393
                       http://www.pragakhan.com
                     Lords of Acid Official Website
                       http://www.lordsofacid.com


On Sun, 21 May 2000, Cameron B. Prince wrote:

> ******    message to minivend-users from "Cameron B. Prince"
<cbp@InternetExpertsLLC.com>     ******
> 
> After thinking about this some more, I am wondering if item-price is
> actually a value.
> 
> Have you tried just [if item-price > 0]?
> 
> Cameron
> 
> 
> 
> -----Original Message-----
> From: owner-minivend-users@minivend.com
> [mailto:owner-minivend-users@minivend.com]On Behalf Of Heinz Wittenbecher
> Sent: Monday, May 22, 2000 1:09 AM
> To: minivend-users@minivend.com
> Subject: [mv] Need some help doing an if compare on price
> 
> ******    message to minivend-users from "Heinz Wittenbecher"
> <heinz@bytedesigns.com>     ******
> 
> I'm up agains a brickwall on this one. The if /then is self-explanitory as
> to what I'm trying to achieve, which is basically not wanting to print
0.00
> as price when no price is available.
> 
> [if value item-price > 0 ]
> [item-price]
> [else]
> PLEASE CALL
> [/else]
> [/if]
> 
> Have tried various variations but always end up with PLEASE CALL.
> 
> I'm trying this on the flypage and then will add it whenever a price is
> displayed.
> 
> TIA - Heinz
> 
> ***********************************************************************
> * Heinz Wittenbecher,      Byte Designs Ltd.    Voice: (604) 534-0722 *
> * heinz@bytedesigns.com    Langley, BC CANADA     Fax: (604) 534-2601 *
> *                      http://www.bytedesigns.com                     *
> 
> 
> 
> 
> -
> 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
> 
> -
> 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
> 

-
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
-
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
-
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: