[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date
][Minivend by thread
]
Wish-List
Is there a way to make this like an [item-list]?
I want to add code to allow someone to order from the wishlist, or view the
product page:
I want to make the wishlist page something like this:
[wish-list username=[scratch wishusername]]
[item-code]: [page [item-code]][item-field title]</a> - [order
[item-code]]Order Me</a><p>
[/wish-list]
Date: Fri, 19 Nov 1999 11:02:59 -0500
From: mike@minivend.com
Subject: Re: [mv] Userdb without Login???
****** message to minivend-users from mike@minivend.com ******
Quoting Loy Ellen Gross (design@iinc.com):
>
> I want to achieve the following effect:
>
> Any user can create a new account for him/herself and save a
> single cart to that account. So far, so good.
>
> Now, I want anyone who wants to be able to view that cart to do
> so without logging in (without needed the password). I'm not
> allowing the original user to save personal or credit card info,
> so security isn't an issue.
>
> The purpose is to creat a "Wish List" of items I want for
> Christmas. With my password, I can go in and change the list.
> With just my username, my family and friends can go in and look
> at the list.
>
> It's the look-up part I'm having trouble with. Am I on the right
> track? Can this be done?
>
With the power of Perl....
UserTag wish-list Order username
UserTag wish-list Routine <<EOR
sub {
my($username) = @_;
my $cart_string;
package Vend::Interpolate;
return 'No wish list'
unless $cart_string = tag_data('userdb', 'carts', $username);
my $safe = new Safe;
my $ref = $safe->reval($cart_string);
return "Bad cart save." if $@;
return "Bad cart save." unless ref $ref;
my $list = $ref->{wish_list};
my $item;
my $out = '';
foreach $item (@$list) {
$out .= "Code: $item->{code}<BR>";
$out .= "Item: ";
$out .= tag_data('products','description', $item->{code});
$out .= "<P>";
}
return 'Nothing in wish list.' unless $out;
return $out;
}
EOR
- --
Mike Heins