MiniVend Akopia Services

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

UserTag-Perl question



******    message to minivend-users from "Rob Zimmerman" <rob@readysite.net>     ******

Thanks to Mike I am making headway on my pricing schemes. Having 
studied the docs on UserTags I found this section of the docs very 
informative ;-) really...better written - more examples...

Mike provided this usertag info which I need to modify. As is it works just as 
the MixMatch directive so I know I am on the right track. I have not yet 
learned Perl so there in lies my need. Here is the task:

What I need to add to this Usertag formula is;
   if sf=noquanity then no mix_match and price=list_price
or
if the item selected is listed in column noquanity then do not include in the 
mix_match subroutine and use ;pricing:list_price for its price. 

#### UserTags #####

UserTag mix-match Order number
UserTag mix-match Routine <<EOR
sub {
 my $nitems = shift;
 my $ca_string = 'products:price';
 my $level;
 my @breaks = ( 1, 2 );
 foreach $level ( @breaks ) {
  last if $nitems < $level;
  $ca_string = "pricing:q$level";
 }
 return $ca_string;
}
EOR

Many thanks for all the help....

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