MiniVend Akopia Services

[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date ][Minivend by thread ]

Re: [mv] Multiple carts in one basket page... [quantity-name] prevents thi s?



At 08:17 AM 9/22/1999 , Eric.Lewis@swisscom.com wrote:
>******    message to minivend-users from Eric.Lewis@swisscom.com     ******
>
>Hi!
>
>I searched through the mail list archive, but didn't find a solution to my
>problem...
>
>I have two carts, one for purchases and one for rentals. The purchases one
>is the normal "main", the other one is called "rental", and I want them both
>on *the same* cart page. Now, in basket.html I have the following code
>(short version):
>
>                        [if items main]
>                        [then]
>                            [item-list main]
>                                <tr>
>                                    <td width="80" align="center">
>                                        <input type=checkbox
>name="[quantity-name]"
> 
>onClick="this.form.action='[process-target]',
>                                        this.form.submit()" value=0>
>                                    </td>
>                                    <td valign="top" align="center">
>                                        <input type="text"
>name=[quantity-name] value="[item-quantity]" size=3>
>                                    </td>
>                                    <td valign="top" align="left">
>                                         [item-field FullDescription]
>                                    </td>
>                                    <td valign="top" align="right">
>                                            [item-price]
>                                    </td>
>                                    <td valign="top" align="right">
>                                            [item-subtotal]
>                                    </td>
>                                </tr>
>                            [/item-list]
>                        [/then]
>                        [/if]
>                        [if items rental]
>                        [then]
>                            [item-list rental]
>                                <tr>
>                                    <td width="80" align="center">
>                                        <input type=checkbox
>name="[quantity-name]"
> 
>onClick="this.form.action='[process-target]',
>                                        this.form.submit()" value=0>
>                                    </td>
>                                    <td valign="top" align="center">
>                                        <input type="text"
>name=[quantity-name] value="[item-quantity]" size=3>
>                                    </td>
>                                    <td valign="top" align="left">
>                                         [item-field FullDescription]
>                                    </td>
>                                    <td valign="top" align="right">
>                                        [currency]
>                                            [item-field rentalprice]
>                                        [/currency]
>                                    </td>
>                                    <td valign="top" align="right">
>                                        [currency]

>                                            [calc]
>                                                [item-field RentalPrice] *
>[item-quantity]
>                                            [/calc]
>                                        [/currency]
>                                    </td>
>                                </tr>
>                            [/item-list]
>                        [/then]
>                        [/if]
>
>I read in the mail archive that if you put the Remove checkbox *after* the
>input field for quantity, it won't work, since MiniVend gets two CGI
>variables called quantity0 (for the first line), one with a value 1 (or
>whatever the quantity is) and another with the value 0 (from the Remove
>checkbox). Since it always takes the first value, the item isn't deleted.
>I figured that this could be my problem. When I look at the HTML code, I see
>the following:
>
>For basket "main":
>The Remove checkbox:
><input type=checkbox name="quantity0"
>onClick="this.form.action='http://whatever/cgi-bin/demo2/process?tImDLzpC;;3
>58', this.form.submit()" value=0>
>The quantity:
><input type="text" name=quantity0 value="1" size=3>
>
>For basket "rental":
>The Remove checkbox:
><input type=checkbox name="quantity0"
>onClick="this.form.action='http://whatever/cgi-bin/demo2/process?tImDLzpC;;3
>94', this.form.submit()" value=0>
>The quantity:
><input type="text" name=quantity0 value="1" size=3>
>
>Yeah, looks pretty much the same. So, if I change anything in the "rental"
>basket, it doesn't reflect and shows the quantity of the "main" basket
>instead. Just for fun, I put the "rental" basket before the "main" basket on
>the page. And now, if I change something in the "rental" basket, it reflects
>in the "main" basket.
>All of this is quite logical, once you see it.
>
>But my problem still isn't solved: How do I get different "quantity.."
>identifiers? Why doesn't MiniVend change to another identifier within a new
>cart? Do I have to do it by hand?

	You probably would have better success if the <input>s did not have the
same 'name' regardless of which <form> they are contained in.  Just my guess.

>
>I'm glad for any help...
>
>Regards,
>Eric
>----------------------------------
>   Swisscom AG      		mailto:eric.lewis@swisscom.com
>   Informatik
>   Eric Lewis, CIT-AE-742
>   Postfach               		phone	+41-31/342 79 71
>   CH-3050 Bern       		fax	+41-31/342 90 69
>----------------------------------
>-
>To unsubscribe from the list, DO NOT REPLY to this message.  Instead, send
>email with 'UNSUBSCRIBE minivend-users' in the body to
Majordomo@minivend.com.
>Archive of past messages: http://www.minivend.com/minivend/minivend-list
> 

Ryan Hertz                                              tel  800-645-BAIT
Webmaster                                               fax  520-645-2588
Advertising Director                            http://www.insideline.net
Gary Yamamoto Custom Baits, Inc.            http://www.yamamoto.baits.com


Search for: Match: Format: Sort by: