Community Forums 

Main Content

Need help with products in the cart!

    Mar 18 2009 14:41:32

    #1

    WINGS

    Join date : 2008-09-18      Posts : 29

    Hi,

    I have 25 products in my shopping cart. These are donation items, so the customer inputs his own $ amount next to each item.

    Currently, all 25 items are being passed to the shopping cart when the order is submitted. Even if the customer selects one of the items, the rest of the products appear in the shopping cart with a $ value of $0.00.
    Is there any way for only the product purchased to appear in the cart and not the rest of the items?

    Here's my code for one of the products (it's the same for all):

    <INPUT size=8 name=price24>
    <input type="hidden" name="product24[]" value="Product 24">
    <input type="hidden" name="qty24" value="1">
    <input type="hidden" name="units24" value="0">

    Thanks in advance for any help on this!

    Anna



    Mar 18 2009 14:56:24

    #2

    anon

    Join date : 2008-09-18      Posts : 488

    Your issue is that you set the quantity to 1 for each product. You could make quantity a checkbox, text input, or drop down. Since it will be either 0 or 1, I would opt for a checkbox.

    If you want to get fancy, you could use a javascript to change quantity to 1 if the price is greater than 0. That would allow you to leave the quantity hidden.



    Mar 18 2009 16:39:42

    #3

    WINGS

    Join date : 2008-09-18      Posts : 29

    Thank you!
    I think leaving the quantity hidden would work best in this scenario. But I'm not javascript savvy... Would it be too much trouble to send me the code? and where on the page should it be placed?

    thanks so much!



    Mar 18 2009 17:44:57

    #4

    anon

    Join date : 2008-09-18      Posts : 488

    Honestly, since I would have to write it and I don't have any use for it myself, it is too much trouble.



    Mar 19 2009 08:36:00

    #5

    GT

    Join date : 2008-09-18      Posts : 3246

    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 19 2009 10:12:34

    #6

    jv

    Join date : 2008-09-18      Posts : 2986

    Looking at it another way you could give everything a hidden price of 1 and the value they entered would be the quantity. If there's no qty then no cart entry.

    <input type="hidden" name="price24" value="1" />
    <input type="hidden name="product24" value="Donation to product24" />
    <input type="hidden" name="units24" value="0">
    <input type="text" name="qty24" />

    Maybe not so pretty but has the advantage that the customer can amend the donation in the cart more easily when it is the quantity than when it is the price.

    Product ----------------- Quantity Price Amount
    Donation to product24 -- 36 -- 1.00 --- 36.00

    Or even change the product to
    Dollars for product24

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




    Mar 19 2009 10:46:31

    #7

    Don

    Join date : 2008-09-18      Posts : 510

    Hi,

    I use this coding for Top Up payments which are similar to making donations.

    Obviously alter the ?? and YOUR info to suit.

    <form style="display:inline; margin-top:0px; margin-bottom:0px;" method="POST" action="http://ww??.aitsafe.com/cf/add.cfm">
    <input type="hidden" name="userid" value="YOUR ID">
    <input type="hidden" name="product[]" value="Top Up Payment">
    <INPUT type="hidden" name="return" value="www.YOUR URL/YOUR URL PAGE.html">
    <INPUT size=8 name=price>
    <INPUT type="submit" value= Pay-Now > <INPUT type="reset" value= Reset >
    </form>

    DB.

    www.donbarrow.co.uk
    www.pacenotes.com
    Please either Share or Like my Facebook




    Mar 19 2009 21:50:38

    #8

    WINGS

    Join date : 2008-09-18      Posts : 29

    Thank you all! I will give this a try!
    THANK YOU!! THANK YOU!! THANK YOU!