[ic] mv_handling sticking on....

Loy Ellen Gross interchange-users@interchange.redhat.com
Wed Mar 20 16:27:01 2002


On Mon, 18 Mar 2002, Mike Heins wrote:

> Quoting Loy Ellen Gross (lgross@thebiz.net):
> > 
> > I have a problem with my current cart. I allow customers to select a
> > more expensive packaging option (it's + $4 usd to whatever shipping
> > they select). It's sticking on. Here is my code and a better
> > description:
> > 
> > In checkout.html:
> > 
> >   [if value mv_handling]
> >     <TR>
> >       <TD ALIGN=left class="contentbar1">Handling:</TD>
> >       <TD ALIGN=RIGHT class="contentbar1">[handling]</TD>
> >     </TR>
> >   [/if]
> > 
> >   ...
> > 
> >   <tr>
> >     <td align="right" class="contentbar1">Use Gel Pack?&nbsp;</td>
> >     <td colspan="3" class="contentbar1">
> >       <input type="checkbox" name="mv_handling" value="gelpack">
> >     </td>
> >   </tr>
> > 
> > And it works wonderfully the first time through ... a customer can
> > choose the pack and it adds $4 to the shipping charge, marked as
> > "Handling."
> 
>     http://interchange.redhat.com/cgi-bin/ic/docfly.html?mv_arg=ictags04%2e12

I must be doing something wrong. With this:

<input type="checkbox" name="mv_handling" [checked name="mv_handling"
value=gelpack] value="gelpack">

once the checkbox is selected, the value of mv_handling is set to
'gelpack' and handling to $4, no matter how many times I uncheck the
box and resubmit the form.

I need handling to reset to $0 if mv_handling is undefined on the
CURRENT form submission ... or do I need to create a dummy definition
with a value of $0 and make this a select box (which is how I was
going to fudge it :)

  -- Loy