[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date
][Minivend by thread
]
HELP: perl variable in a minivend tag
I'm running into some trouble with interpolation. How can I use a perl
variable within a minivend tag? What I'm attempting to do is as follows:
[perl interpolate=1]
$code = [item-code];
$GRS = [data products GRS $code];
[/perl]
The above doesn't work.
Yes, I know I can just do [data products GRS [item-code]] in this case but
this is just a test for what I really want to do. I need to be able to look
up a field in a usertag like so:
UserTag price-mod Routine <<EOR
sub {
my $item = $Vend::Interpolate::item;
my $code=$item->{code};
my $GRS=[data products GRS $code];
return $GRS;
}
I tried setting the item-code to a value/scratch variable and doing [data
products GRS [value code]]/[data products GRS [scratch code]] except that
gives me the following errors, respectively, in debug mode:
Died in server spawn: There is no row with index '[value' at
/var/www/virtual/jewelp/mvend/lib/Vend/Table/DB_File.pm line 181.
Died in server spawn: There is no row with index '[value' at
/var/www/virtual/jewelp/mvend/lib/Vend/Table/DB_File.pm line 181.
I have searched through the mail list archive and found similar problems but
no working solution. As have I read the documentation to no avail.
I have been working on this for litteraly weeks and am quite sure someone
experienced must have come into this at some point and I am equally sure
there is a way to do it, I just haven't found it yet :(
Please, please, please, with a cherry on top ;)
Ezra