[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date
][Minivend by thread
]
Re: [mv] perl string > integer: Sorry Not yet solved.
****** message to minivend-users from Ed LaFrance <edl@newmediaems.com> ******
Sezer -
I have been watching this thread a little while. [item-field taxrate] is a
context-sensitive reference, it would only work within a fly-list,
search-list or item-list tag pair. Are you trying to do this in an inline
[perl] construct, a usertag, or a globalsub. You need to post the entire
code and the method by which it is called, otherwise you may be overlooking
the problem, and inadvertently hiding it from those who are trying to help
you!
- Ed L.
At 05:48 PM 9/27/00 +0300, you wrote:
>****** 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
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
New Media E.M.S. Software Solutions for Business
463 Main St., Suite D edl@newmediaems.com
Placerville, CA 95667 http://www.newmediaems.com
(530) 622-9421 (530) 622-9426 fax
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
-
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