MiniVend Akopia Services

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

Re: [AM] Pricing and Subtotal help.




At 02:42 AM 10/21/99 -0400, you wrote:
>******    message to minivend-users from mike@minivend.com     ******
>
>Quoting .cory.trese. (digital@specialty-books.com):
> >
> > >message to minivend-users from Andrew Mull <mull@early.com>
> > >
> > >Hello,
> > >
> > >The items in my catalog require the use of two prices - one for members,
> > >and one for non-members.  There is no correlation between the two prices
> > >for all the products. i.e.  The member and non-member prices do not 
> follow
> > >a certain rule ($5 off or 10%, etc) for all the products in this
> > >database.  Therefore, the "discount" facility will not work for me.
> > >
> >
> > Hmm.  I see.  Perhaps placing all the products in one database is not 
> the best
> > way to do this.  MiniVend (at least to me, I may be way off here) seems 
> to be
> > pretty set in it's ways of using one base price and then adjusting it for
> > different circumstances.
>
>Not necessarily; there are about a zillion ways to do it.
>
>1.
>
>CommonAdjust   "[if scratch 
>member]products:member_price[else]products:price[/else][/if]"
>
>Don't do [if scratch member =~ /something/], as that will kill performance.
>
>2. Locale -- different one for members and non-members. This is actually quite
>nice, because it allows you to give different messages too:
>
>         [LC]
>                 This is the mon member text.
>                 [member] Member text [/member]
>         [/LC]
>
>3.
>
>Autoload   <<EOF
>[perl arg="scratch config"]
>         return if ! $Safe{scratch}{member};
>         $Safe{scratch}{config}{PriceField} = 'member_price';
>         return;
>[/perl]
>
>I can think of several more as well.
>
>--
>Mike Heins                          http://www.minivend.com/  ___
>                                     Internet Robotics        |_ _|____
>Be patient. God isn't               131 Willow Lane, Floor 2  | ||  _ \
>finished with me yet.               Oxford, OH  45056         | || |_) |
>  -- unknown                         <mikeh@minivend.com>     |___|  _ <
>                                     513.523.7621 FAX 7501        |_| \_\
>-
>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


Thanks for your help! However, I can't seem to get anything to work.  This 
is what I have.

"member_yn" is a dropdown input field that the user selects YES or NO if 
they are a member.

This is the code at the top of the page before and items are displayed:

[if value member_yn eq 'Yes']

[perl arg="scratch config"]
$Safe{scratch}{config}{PriceField} = 'price';
return;
[/perl]

[else]

[perl arg="scratch config"]
$Safe{scratch}{config}{PriceField} = 'nonprice';
return;
[/perl]

[/else]
[/if]

 From then on, I use the standard [item price] [item-subtotal] and 
[subtotal] tags.

Where am I going wrong?

Thanks in advance!
-Andy

____________________________________________________________________
Andrew Mull
Early Access

Email: mull@early.com
Phone: (610) 683-8901
www.early.com 


Search for: Match: Format: Sort by: