Akopia Akopia Services

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

[mv] [MV3.14] Starnge MV Behivor



******    message to minivend-users from "Eran Binyamin Zeitoun" <eran_zeitoun@karmail.com>     ******

Hi List...
1. I have a user tag named Case (check a varible for varity of values),
   when i do [case [item-field category]] it works great...., as for the
example
  [case [item-field category]]
  [hds]Hard-Drives[/hds]
  [cds]CD-ROMs[/cds] ... and so on
  [/case]

  When i try to do the same for a varible from userdb ("payment"), this user
tag does not
  want to work at all... i tried [case [value payment]] & and [case [data
session payment]] to access the
  varible but nada....  does any one else have another idea how should i
call the data ?

  i always get the following error when doing so:
  212.143.86.233 ehoLqUKe_212.143.86.233 - [29/July/2000:16:41:33 +0200]
karma-shop /cgi-bin/karma-
  shop.exe/scan/st=sql/se=wd/sf=searchcat/ml=10 Died in server spawn:
/\[[value payment\](.*)\[/[value payment\]/: unmatched [] in
  regexp at (eval 48) line 3.

2. I would like to know the diffrence in speed between globalsub and
usertag...
   i mean i am aware from reading that somewhere its writte about security
or somthing....
  but what's important is the speed of runing...

------------
Just in case some one want to see the CASE user tag thing:
UserTag case Order category
UserTag case HasEndTag
UserTag case Routine <<EOF
sub {
my ($cat, $text) = @_;
$text =~ m{\[$cat\](.*)\[/$cat\]}s
and return $1;
$text =~ s{\[(\w+)\].*\[/\1\].*}{}s;
return $text;
}
EOF

now as for the Payment varible since the CASE thing does not work..., i am
using:
[if value payment eq "0"][currency][perl arg=sub
interpolate=1]calcprice([item-field price], [item-field basefact],
[item-field impfact], [value gain], 0)[/perl][/currency][/if]
[if value payment eq "1"][sql type=list query="select thirty from ugroups
where grp = '[value grp]'"][value name="userfact" set="[sql-param thirty]"
hide=1][/sql]
[currency][perl arg=sub interpolate=1]calcprice([item-field price],
[item-field basefact], [item-field impfact], [value gain], [value
userfact])[/perl][/currency][/if]
[if value payment eq "2"][sql type=list query="select sixty from ugroups
where grp = '[value grp]'"][value name="userfact" set="[sql-param sixty]"
hide=1][/sql]
[currency][perl arg=sub interpolate=1]calcprice([item-field price],
[item-field basefact], [item-field impfact], [value gain], [value
userfact])[/perl][/currency][/if]

(calcprice is a globalsub...)

Thanks for reading,
and more thanks if you help,
Eran.



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