Community Forums 

Main Content

Price not transfering to cart

    Mar 29 2017 20:54:36

    #1

    BReints

    Join date : 2017-03-29      Posts : 1

    I'm trying to give people the option to choose membership levels from a drop-down menu. I've tried using productpr[] and event just having price be filled in from a drop-down, but I keep getting a "your cart is empty" error when using pay.cfm. When using add or multiadd I got syntax error, price not select.

    <form action="http://ww4.aitsafe.com/cf/pay.cfm"; method="post">
    <div style="display: none;"><input name="userid" type="HIDDEN" value="691XXXXX" /></div>
    <div style="display: none;"><input name="product[]" type="HIDDEN" value="Membership" /></div>
    Joining as: <input type="hidden" name="productpr[] value=""/>
    <select name="productpr[]">
    <option value="I:25"> Individual $25</option>
    <option value="F:50"> Friend $50</option>
    <option value="H:100"> Household/Family $100</option>
    <option value="N:200"> Neighbor $200</option>
    <option value="A:500"> Advocate $500</option>
    <option value="S:1000"> Steward $1000</option>
    </select>

    <h4>Enter Your Information</h4>
    Name: <input name="inv_name" size="20" type="text" />
    Address: <input name="inv_addr1" size="60" type="text" />
    City: <input name="inv_addr2" type="text" /> State: <input name="inv_state" type="text" size="2" /> Zip: <input name="inv_zip" type="text" size="5" />
    Phone: <input name="tel" type="text" />  Email: <input name="email" type="text" />
    <input name="inv_country" type="hidden" value="US" />
    <input name="qty1" size="1" type="hidden" value="1" />
    <div><input type="submit" value="Continue to Payment Info" /></div>
    </form>

    I don't understand what's missing!



    Mar 30 2017 01:12:05

    #2

    Debbie Q

    Join date : 2008-09-18      Posts : 4989

    <select name="productpr1">

    Debbie Q

    Mal's Support: www.mals-e.com/support.php
    GT's Forms and examples: www.malsforms.com
    Helpful java scripts: www.gemasana.com/mals
    Shipping help documents: www.stoner.org.uk/mals

    My Create-A-Book Publishing - mycreateabook.com
    Personalized Books, Music CDs and Gifts for all ages and occasions.

    Please help me out and share my site on your networks.




    Mar 30 2017 08:54:19

    #3

    GT

    Join date : 2008-09-18      Posts : 3202

    You have two productpr syntax:
    <input type="hidden" name="productpr[] value=""/>
    <select name="productpr[]">

    So you are confusing the cart and it is possibly using the first value which is zero.

    If using productpr, there is no product syntax, but you are using one.

    You are using square brackets, there is no need to use these with productpr.

    You are using qty1 although there is only one product...
    <input name="qty1" size="1" type="hidden" value="1" />
    Use instead:
    <input name="qty" size="1" type="hidden" value="1" />

    You do not have any return value, is this needed or not?

    A working form would be:

    <form action="http://ww4.aitsafe.com/cf/pay.cfm"; method="post">
    <div style="display: none;">
    <input name="userid" type="hidden" value="691XXXXX" />
    <input name="inv_country" type="hidden" value="US" />
    <input name="qty" size="1" type="hidden" value="1" />
    </div>

    Joining as:
    <select name="productpr">
    <option value="Membership I:25"> Individual $25</option>
    <option value="Membership F:50"> Friend $50</option>
    <option value="Membership H:100"> Household/Family $100</option>
    <option value="Membership N:200"> Neighbor $200</option>
    <option value="Membership A:500"> Advocate $500</option>
    <option value="Membership S:1000"> Steward $1000</option>
    </select>

    <h4>Enter Your Information</h4>
    Name: <input name="inv_name" size="20" type="text" />
    Address: <input name="inv_addr1" size="60" type="text" />
    City: <input name="inv_addr2" type="text" /> State: <input name="inv_state" type="text" size="2" /> Zip: <input name="inv_zip" type="text" size="5" />
    Phone: <input name="tel" type="text" /> Email: <input name="email" type="text" />
    <div><input type="submit" value="Continue to Payment Info" /></div>
    </form>

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

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




    Mar 31 2017 13:23:56

    #4

    Geoff

    Join date : 2008-09-18      Posts : 415

    That will not work, GT. Debbie Q was correct. For pay.cfm the product field names require a number appending e.g. product1, productpr1, qty1. (see support page https://www.mals-e.com/tpv.php?tp=28)

    A minor point, but <div style="display: none;"> is unnecessary as a hidden form element is, of course, hidden.



    Mar 31 2017 14:04:08

    #5

    Alan

    Join date : 2008-09-18      Posts : 2944

    pay.cfm will not work with V2 of the cart so it may be better to go back to add.cfm or addmulti.cfm unless you want the pay.cfm features.

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