[ic] undeletable items - part way there

Stefan Hornburg interchange-users@icdevgroup.org
Fri May 30 17:09:00 2003


On Fri, 30 May 2003 16:43:29 -0400
Aaron Hazelton <aaronmail@hazenet.net> wrote:

> On Fri, 30 May 2003 21:09:10 +0100, Jamie Neil <jamie@versado.net>
> wrote:
> 
> >>
> >> > I think the easiest way would be to make sure that any items
> >added> > from a quote are impossible to delete.  that way, someone
> >could> > still purchase extra items and delete those before checking
> >out.>
> >> Ok, I have it working part way.  Here is what I am doing in the
> >[item-> list]: (it might be cheesy, but im no guru :-)
> >>
> >> [tmp quote_chk][filter 2][item-sku][/filter][/tmp]
> >> [if type="scratch" term="quote_chk" op="eq" compare="q-"][tmp
> >
> > I could be wrong, but I didn't think you could use compare with type
> > "scratch". I think the syntax can only be:
> >
> > 	[if type=scratch term=variable]
> >
> > If the scratch variable is set to anything, then it returns true, if
> > 
> > empty
> > it returns false.
> >
> > How about:
> >
> > 	[if type=explicit compare=|[scratch quote_chk] eq 'q-'|]
> >
> > or something like that?
> >
> > I know I've got stuck on "if" syntax more times than I can remember.
> >
> > Jamie
> 
> I know, these 'ifs' give me a headache! Unfortunately, this does not
> work either.  Actually my code does produce the expected results as
> to the form elements, it just seems to be the removal of an item when
> all that is left in the cart are these on fly items coming from
> the quote ...

You can always resort to embedded Perl

[calc]if ($Scratch->{quote_chk} eq 'q-') { ... } [/calc]

Bye
	Racke


-- 
LinuXia Systems => http://www.linuxia.de/
Expert Interchange Consulting and System Administration
ICDEVGROUP => http://www.icdevgroup.org/
Interchange Development Team