[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date
][Minivend by thread
]
[mv] perl string > integer: Sorry Not yet solved.
****** message to minivend-users from Sezer Yalcin <sezery@damla.net> ******
hi again,
thank all of you for suggestions. I carefully tested each of them either
there were no difference or gave errors. I forgot to mention i use
Mv3.14-3. Probably some are for mv 4.x. That was stupid of myself.
well come for the suggestions:
1.
Assuming this is data you are feeding TO perl, the single
quotes are telling perl it is a string. Drop them. You might
or might not need to do +0; at end to force it to add 0 and
make it a number.
Christopher F. Miller, Publisher
* Thank you but it again made the result 0,
$rate = '[data taxgroups rate [item-field taxgroup]]';
rate += 5;
Now this results only "5" where when i print "rate" before adding 5, it
prints "1700" thanks ok but no aritmetics available.
2.try this
my $rat;
my $db = 'products';
my $field = 'taxgroup';
my $code = [item-code] (or [item-field code/sku?])
$rat = Vend::Interpolate::tag_data($db, $field, $code);
Hans-Joachim Leidinger
*thank you but this did not work out giving this error:
Safe: Undefined subroutine &Vend::Interpolate::tag_data called at (eval
135) line 25.
whereas i include headers:
[perl scratch values tables="taxgroups"]
package Vend::Interpolate;
package Vend::Data;
..
..
i also tried:
Vend::Data::database_field($db, $code,$field,);
error was: Safe: Can't call method "data" without a package or object
reference at (eval 133) line 2.
you mention sth about sub? do i need to make it a subroutine? I think
the problem was because of version mismatch of minivend.
3.
[seti dummytax][data taxgroups rate [item-field taxgroup]][/seti]
in your perl codes, try
$dummy = $Safe{'scratch'}->{'dummytax'} * 1;
$rate = $dummy;
this does not work. i think [seti] is not available in 3.14.
what do you suggest for now? should i upgrade to a never version? i am
willing to that if this problem will br certainly fixed and no
compatibility problems around.
regards.
Sezer YALÇIN
email: sezery@damla.net
-
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