Community Forums 

Main Content

Add to Cart and View Cart difficulties

    Nov 01 2016 22:09:22

    #1

    Jack M

    Join date : 2016-11-01      Posts : 1

    In the top example the View Cart button works as it is supposed to. However, I would like to have it placed in the same row as shown in the example on the bottom. The example on the bottom doesn't work properly. It adds an item to the cart when you click on View Cart. And, finally, how do I center that group of 4 buttons underneath the price? I would REALLY appreciate any help you can offer.

    EXAMPLE #1:
    <form action="http://ww8.aitsafe.com/cf/add.cfm";;; method="post">
    <input type="hidden" name="userid" value="A2413143">
    <input type="hidden" name="return" value="http://homemade-stuff.xp3.biz/paracord-thin-line-bracelet.php">;
    <input type="hidden" name="price" value="12.00">
    <input type="hidden" name="product[]" value="Thin Blue Line Paracord Survival Bracelet">


    <select name="product[]" size="1">
    <option selected value="">Select Fit</option>
    <option value="Snug">Snug Fit</option>
    <option value="Loose">Loose Fit</option>
    </select>

    <select name="product[]" size="1">
    <option selected value="">Select size</option>
    <option value="5">5"</option>
    <option value="5.25">5-1/4"</option>
    <option value="5.5">5-1/2"</option>
    <option value="5.75">5-3/4"</option>
    <option value="6">6"</option>
    <option value="6.25">6-1/4"</option>
    <option value="6.5">6-1/2"</option>
    <option value="6.75">6-3/4"</option>
    <option value="7">7"</option>
    <option value="7.25">7-1/4"</option>
    <option value="7.5">7-1/2"</option>
    <option value="7.75">7-3/4"</option>
    <option value="8">8"</option>
    <option value="8.25">8-1/4"</option>
    <option value="8.5">8-1/2"</option>
    <option value="8.75">8-3/4"</option>
    <option value="9">9"</option>
    <option value="9.25">9-1/4"</option>
    <option value="9.5">9-1/2"</option>
    <option value="9.75">9-3/4"</option>
    <option value="10">10"</option>
    <option value="10.25">10-1/4"</option>
    <option value="10.5">10-1/2"</option>
    <option value="10.75">10-3/4"</option>
    <option value="11">11"</option>
    </select>

    <input type="submit" value=" Add to Cart ">
    </form>
    <FORM METHOD="post" action="http://ww8.aitsafe.com/cf/review.cfm">;
    <INPUT TYPE="hidden" NAME="userid" VALUE="A2413143">
    <INPUT TYPE="hidden" NAME="return" VALUE="http://homemade-stuff.xp3.biz/paracord-thin-line-bracelet.php?">;
    <INPUT TYPE="submit" VALUE=" View Cart ">
    </FORM>


    EXAMPLE #2:
    <form action="http://ww8.aitsafe.com/cf/add.cfm";;; method="post">
    <input type="hidden" name="userid" value="A2413143">
    <input type="hidden" name="return" value="http://homemade-stuff.xp3.biz/paracord-thin-line-bracelet.php">;
    <input type="hidden" name="price" value="12.00">
    <input type="hidden" name="product[]" value="Thin Red Line Paracord Survival Bracelet">


    <select name="product[]" size="1">
    <option selected value="">Select Fit</option>
    <option value="Snug">Snug Fit</option>
    <option value="Loose">Loose Fit</option>
    </select>

    <select name="product[]" size="1">
    <option selected value="">Select size</option>
    <option value="5">5"</option>
    <option value="5.25">5-1/4"</option>
    <option value="5.5">5-1/2"</option>
    <option value="5.75">5-3/4"</option>
    <option value="6">6"</option>
    <option value="6.25">6-1/4"</option>
    <option value="6.5">6-1/2"</option>
    <option value="6.75">6-3/4"</option>
    <option value="7">7"</option>
    <option value="7.25">7-1/4"</option>
    <option value="7.5">7-1/2"</option>
    <option value="7.75">7-3/4"</option>
    <option value="8">8"</option>
    <option value="8.25">8-1/4"</option>
    <option value="8.5">8-1/2"</option>
    <option value="8.75">8-3/4"</option>
    <option value="9">9"</option>
    <option value="9.25">9-1/4"</option>
    <option value="9.5">9-1/2"</option>
    <option value="9.75">9-3/4"</option>
    <option value="10">10"</option>
    <option value="10.25">10-1/4"</option>
    <option value="10.5">10-1/2"</option>
    <option value="10.75">10-3/4"</option>
    <option value="11">11"</option>
    </select>

    <input type="submit" value=" Add to Cart ">
    <input type="SUBMIT" value=" View Cart ">
    </form>



    Nov 02 2016 03:00:33

    #2

    GT

    Join date : 2008-09-18      Posts : 3207

    This is done using css...

    You cannot have two submit buttons in one form...
    <input type="submit" value=" Add to Cart ">
    <input type="SUBMIT" value=" View Cart ">
    Only the first one will work.

    Having trouble with a form or need one building?
    Fast turnaround, but I do charge :)

    Mal's Forms / Scripts and the syntax are here.