[ic] undeletable items - part way there

Jamie Neil interchange-users@icdevgroup.org
Fri May 30 16:09:01 2003


> -----Original Message-----
> From: interchange-users-admin@icdevgroup.org
> [mailto:interchange-users-admin@icdevgroup.org]On Behalf Of Aaron
> Hazelton
> Sent: 30 May 2003 18:17
> To: interchange-users@icdevgroup.org
> Subject: Re: [ic] undeletable items - part way there
>
>
> On Fri, 30 May 2003 10:13:45 -0400, Aaron Hazelton
> <aaronmail@hazenet.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

> no_delete]1[/tmp][/if]
>
> (the remove area)
> [if scratch no_delete]
> <small><small>Quote<BR>Item</small></small>
> [else]
> <INPUT TYPE=checkbox NAME="[quantity-name]"
> onClick="this.form.action='[process-target]', this.form.submit()" VALUE=0>
> [/else]
> [/if]
>
> (the quantity area)
> [if scratch no_delete]
> <B>[item-quantity]</B>
> [else]
> <INPUT TYPE=text NAME="[quantity-name]" VALUE="[item-quantity]" SIZE=3>
> [/else]
> [/if]
>
> [tmp no_delete][/tmp]
> [/item-list]
>
> >
> Here's my problem: Even though this is working correctly and
> displaying the
> 'remove' checkbox and the 'qty' input for items
> that are not on a quote, when you click the remove check or '0'
> the input,
> the page refreshes, and the item will not go
> away.
>
> More info: if you have items in the cart BEFORE adding these
> quote items in (via OnFly) then all deletable items can be removed.
> However, if you have ONLY quote items in and then
> add other items, all of those subsequent items cannot be removed.  weird..
>
> Any ideas on what is going wrong?  there is no error in the
> logs ...
>
> --
> Aaron Hazelton
> Hazenet.net
> _______________________________________________
> interchange-users mailing list
> interchange-users@icdevgroup.org
> http://www.icdevgroup.org/mailman/listinfo/interchange-users
>