[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
[ic] email tag for ship_notice CHANGED:[if value email_copy ...] on ship_notice [SOLVED]
For anyone that is interested... Here's the outcome:
Stefan Hornburg (Racke) wrote:
> "Aaron Hazelton" <aaronmail@hazenet.net> writes:
>
>
> [...]
>
> > [loop prefix=user search="
> > fi=userdb
> > st=db
> > sf=username
> > se=[loop-data transactions username]
> > ml=1000
> > rf=email_copy
> > "]
> > [if value "[loop-data userdb email_copy]" eq 1]
> > Email...plain text...
> > [elsif value "[loop-data userdb email_copy]" eq 2]
> > Email ...html format....
> > [/elsif]
> > [/if]
>
> Probably there need to be a closing [/loop].
I already did, I just forgot to type it...
> The other thing is that
> you choosed prefix=user, so within the loop you need to use
> [user-data userdb email_copy] etc. The next thing your if's are
> wrong. Please read the docs.
>
> Ciao
> Racke
>
> --
> Think of it !
BTW, this works, but if im still off, someone please tell me!
New code in the 'ship_notice' file:
[perl arg=scratch]
$Config->{NoSearch} = '';
return '';
[/perl]
[loop prefix=user search="
fi=userdb
st=db
sf=username
se=[loop-data transactions username]
ml=1000
rf=email_copy
"]
[if explicit]
[condition]
$emailtype = '[user-param email_copy]';
return 1 if $emailtype == 1;
return 0;
[/condition]
<!--PLAIN TEXT EMAIL-->
[else]
<!--HTML EMAIL-->
[/else]
[/if]
[/loop]
Thanks to everybody who helped on this!
_____
Sincerely,
Aaron Hazelton
>>Hazenet<<
aaron@hazenet.net