[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date
][Minivend by thread
]
Re: [mv] [if] [/if] tags help....
Hi Eran,
sorry for my bad english!
Can you give us more detail information? Get you any error in your
error.log? Get you an empty value? Have you test this:
[if-field categroy]
The value is not empty!
[else]
The value is empty!
[/else]
[/if-field]
(make sure, you did make an empty field category in your products.asc
file to test the code)
I use
[if-field category]
Show the value of the field category
[/if-field]
or
[if explicit]
[condition]
$dummy = '[item-field price]';
return 1 if $dummy =~ /ca/;
return 0;
[/condition]
<TD><B>[L]Price[/L]: <B>ask us!</B></TD>
[else]
<TD><B>[L]Price[/L]: <B>[item-price]</B></TD>
[/else]
[/if]
and it works well! Have you used this to test the field, if the field
category is not empty?
I am not sure, if i have understood you right!
Do you mean
> [if-field category =~ /storage/]1111111111111111111[/if-field]
is displaying as
> if-data products category =~ /storage/]1111111111111111111[/if-data]
? The normal result is "1111111111111111111" or not.
What happen if you use [if-field category] Yes! This is![/if-field] ?
Maybe there are a typo in your page? The most common reason to get a
failure with a right tag (e.g. [if-field...], [if-loop-data],
[if-loop-field], [loop-code], [loop-field], etc.) is e.g.
- anywhere in your page is a typo, e.g. missing right/left braket "]" or
"["
- using special tag outside the search/loop or any region, e.g.
without [search-region send=1] .... [/search-region] or outside from
this.
another example: [more] without (or outside from)
[more-list]...[/more-list] doesn´t work.
- Sometimes, but not always, you create a code in a win-box and use ftp
to transfer this to your webspace. In win-box, there is another line
ending code "\r" or in unix with emacs, the editor display it as "^M".
This can cause any failure.
Maybe you can try this:
[perl arg=scratch]
$Safe{'scratch'}->{'dummy'} = '[item-field category]';
return '';
[/perl]
[perl]
$_ = $Safe{'scratch'}->{'dummy'};
if ($_ eq 'storage'){$Safe{'scratch'}->{'dummy'} = '111';}
if ($_ eq 'storage2'){$Safe{'scratch'}->{'dummy'} = '222';}
if ($_ eq ""){$Safe{'scratch'}->{'dummy'} = 'Somethings is wrong!';}
return '';
[/perl]
[if scratch dummy eq ´111´]
any stuff of 111
[else]
Dummy is : [scratch dummy]<BR>
[/else]
[/if]
or simply
[perl arg=scratch]
$Safe{'scratch'}->{'dummy'} = ´[item-field category]´;
return '';
[/perl]
[if scratch dummy eq '111'] any stuff of 111 [/if]
[if scratch dummy eq '222'] any stuff of 222 [/if]
[if scratch dummy eq '333'] any stuff of 333 [/if]
All above code is not tested and coming from my head!
Good lucks!
Joachim
Good luck!
Eran Binyamin Zeitoun wrote:
>
> ****** message to minivend-users from "Eran Binyamin Zeitoun" <eran_zeitoun@karmail.com> ******
>
> Well i tried the method you (Joachim) said but in the html code its written:
>
> [if-field category =~ /storage/]1111111111111111111[/if-field]
>
> and on the screen its dsipalying (its not doing the if thing at all, that
> interpretate and assign values where needed):
>
> if-data products category =~ /storage/]1111111111111111111[/if-data]
>
> (it happens the same in the other way you wrote me).
>
> any other ideas?
>
> Thanks,
> Eran Binyamin Zeitoun.
>
--
-------------Hans-Joachim Leidinger---------------------