Community Forums 

Main Content

Issues with using a form to input products on shopping cart

    Dec 05 2017 22:12:22

    #1

    Tod

    Join date : 2017-12-05      Posts : 2

    Hi,

    I've been a long time user here, and I've never had any issues. I just launched a new website, and I was setting up the shopping cart for it today. The cart however, isn't posting the correct prices for the prints I sell.

    Here is the form code:

    <div id="FormDiv"><form method="post" action="http://ww8.aitsafe.com/cf/add.cfm?"><input type="hidden" name="userid" value="XXXXXXXX">

    <div id="Seven"><input type="radio" name="product" value="Great Blue Heron, 5 in. x 7 in. print" style="font-size:16px" checked> 5 in. x 7 in. &ndash; $49.95<input type="hidden" name="price"
    value="49.95"></div>
    <div id="Ten"><input type="radio" name="product" value="Great Blue Heron, 8 in. x 10 in. print" style="font-size:16px"> 8 in. x 10 in. &ndash; $74.95<input type="hidden" name="price"
    value="74.95"></div>
    <div id="Fourteen"><input type="radio" name="product" value="Great Blue Heron, 11 in. x 14 in. print" style="font-size:16px"> 11 in. x 14 in. &ndash; $99.95<input type="hidden" name="price"
    value="99.95"></div>
    <div id="Paper">Paper: <input type="radio" name="paper" value="Fine Art Paper" style="font-size:16px" checked>Fine Art <input type="radio" name="paper" value="Pearl Metallic Paper" style="font-size:16px"> Pearl Met.</div>
    <div id="Quantity">Quantity: <input type="text" name="quantity" size="2" maxlength="2" style="font-size:16px"></div>
    <div id="Order"><button type="submit" title="Add to Cart">ADD TO CART</button><input type="hidden" name="return" value="www.photoenviro.com/html/critters.html"></div>;
    </form></div></div>

    The shopping cart only gives the highest price, even though the correct print size is displayed. What am I missing here? I was going to post some screen shots, but it doesn't seem to be allowed?

    Thanks,

    Tod



    Dec 06 2017 07:45:34

    #2

    Alan

    Join date : 2008-09-18      Posts : 2951

    The radio button selects a product but the cart does not know which price to use so it will use the last one.

    You can change to productpr which includes the price. "Description:Price:Units:Scode:Hash"

    <input type="radio" name="productpr" value="Great Blue Heron, 5 in. x 7 in. print:$49.95"/>

    Click on "Support / Using an HTML Form" or go directly to

    https://www.mals-e.com/tpv.php?tp=2

    Alan
    Some shipping help documents are available at www.stoner.org.uk/mals/




    Dec 06 2017 14:41:15

    #3

    Tod

    Join date : 2017-12-05      Posts : 2

    Thank you, Alan. I finally realized my mistake in the wee hours of the morning, and experimented a little with the "productpr" function, which works great in this instance! Thanks again!