Community Forums 

Main Content

Help with an Optional Extra for a Product Form

    Aug 16 2012 19:30:41

    #1

    paul_richardson

    Join date : 2008-10-04      Posts : 70

    Hi Guys,
    I want to offer an optional extra (at extra cost) to a product I intend to sell.

    I want to use a "push Button" to select the option, you only get one optional extra, no matter how many of the main product you buy.

    It already has a quantity option and a colour selection.

    Here is the existing Form:-

    <form action="http://ww5.aitsafe.com/cf/add.cfm"; method="post">
    <input type="hidden" name="return" value="www.craftee.co.uk/xaperturepanels.php#ap124">;
    <input type="hidden" name="userid" value="78209165">
    <input type="hidden" name="nocart">
    <input type="hidden" name="product[]" value="AP124, Double Holly, Aperture Panels">
    <input type="hidden" name="price" value="0.99">
    <input name="qty" size="2" type="text">
    Enter Quantity<br>
    <select name="product[]">
    <option value="White" selected>Select Colour</option>
    <option value="White">White</option>
    <option value="Ivory">Ivory</option>
    <option value="Cream">Cream</option>
    <option value="Grey">Grey</option>
    <option value="Black">Black</option>
    <option value="Burgundy">Burgundy</option>
    </select>
    <br>
    <input type="submit" value="Buy Now">
    </form>

    Any assistance would be greatly appreciated.

    Regards,

    Paul



    Aug 16 2012 20:25:47

    #2

    Debbie Q

    Join date : 2008-09-18      Posts : 4994

    You would use the form method addmulti adding numbers to the main product fields and the options. Would this additional option be using the same qty as the main item? ie: If they ordered 3 of the Holly would they need 3 of the extra option as well? If So GT has a script to do that on his page.

    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.




    Aug 17 2012 08:42:32

    #3

    paul_richardson

    Join date : 2008-10-04      Posts : 70

    Debbie Q said Would this additional option be using the same qty as the main item? ie: If they ordered 3 of the Holly would they need 3 of the extra option as well? .

    Hi Debbie, thanks for your reply.

    In my case the customer would only want one of the additional option, regardless of how many of the main item they bought.

    I'll have a look at GT's scripts and see what I can find.

    Regards,

    Paul



    Aug 17 2012 13:56:09

    #4

    Debbie Q

    Join date : 2008-09-18      Posts : 4994

    In that case you don't need any extra script. Just use addmulti making it be 2 products.

    <form action="http://ww5.aitsafe.com/cf/addmulti.cfm";; method="post">
    <input type="hidden" name="return" value="www.craftee.co.uk/xaperturepanels.php#ap124">;;
    <input type="hidden" name="userid" value="78209165">
    <input type="hidden" name="nocart">
    <input type="hidden" name="product1[]" value="AP124, Double Holly, Aperture Panels">
    <input type="hidden" name="price1" value="0.99">
    <input name="qty1" size="2" type="text">
    Enter Quantity<br>
    <select name="product1[]">
    <option value="White" selected>Select Colour</option>
    <option value="White">White</option>
    <option value="Ivory">Ivory</option>
    <option value="Cream">Cream</option>
    <option value="Grey">Grey</option>
    <option value="Black">Black</option>
    <option value="Burgundy">Burgundy</option>
    </select>
    <br>
    <input type="radio" name="productpr2" value="extra option1:1.00">option 1
    <input type="radio" name="productpr2" value="extra option2:1.50">option 2
    <input type="hidden" name="qty2" value=1>
    <br>
    <input type="submit" value="Buy Now">
    </form>

    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.




    Aug 17 2012 14:55:29

    #5

    paul_richardson

    Join date : 2008-10-04      Posts : 70

    Hi Debbie,

    Many thanks for the Form, it works perfectly.

    I only need one option so I deleted the second option line.

    So I fully understand how it works I would just like to confirm that the line below:-

    <input type="hidden" name="qty2" value=1>

    puts the quantity in the cart for the optional item.

    Thanks again Debbie.

    Regards,

    Paul



    Aug 17 2012 15:07:24

    #6

    Debbie Q

    Join date : 2008-09-18      Posts : 4994

    Yes, With addmulti you need a qty field to send the item to the cart. If the radio button is not clicked nothing will be sent.

    paul_richardson said Hi Debbie,
    So I fully understand how it works I would just like to confirm that the line below:-
    <input type="hidden" name="qty2" value=1>
    puts the quantity in the cart for the optional item.

    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.




    Aug 17 2012 16:24:46

    #7

    paul_richardson

    Join date : 2008-10-04      Posts : 70

    Hi Debbie,

    Thanks for that, I'll know what to do with it in the future.

    I have just uploaded my new page to test it and it works 100%:-

    http://www.craftee.co.uk/xaperturepanels.php

    Thanks again

    Paul



    Aug 19 2012 15:31:58

    #8

    paul_richardson

    Join date : 2008-10-04      Posts : 70

    Hi Debbie,

    Just had a thought.

    The Optional Template is supplied by email, but the form adds postage to both items.

    Can I use the "noship" option and only make it apply to the option?

    Regards,

    Paul