Community Forums 

Main Content

Help needed with drop down box price with price adjustment in cart

    Dec 05 2011 15:36:16

    #1

    SteveMck

    Join date : 2011-11-29      Posts : 19

    Hi, I need a little help so i dont have to have too many add to cart buttons on my site, below is my current form for an item:

    <form action="http://ww6.aitsafe.com/cf/add.cfm";; method="post">
    <input type="hidden" name="userid" value="83447522">
    <input type="hidden" name="product[]" value="Wool Overs - Hillwalker ">
    <input type="hidden" name="price" value="32.95">
    <input type="hidden" name="nocart">
    <input type="hidden" name="return" value="www.countryclothingcompany.co.uk/hill-walker.html">;
    <select name="product[]">
    <option value="----Select Size----">--- SELECT SIZE ---</option>
    <option value="Medium">Medium</option>
    <option value="Large">Large</option>
    <option value="XLarge">XLarge</option>
    </select>
    <select name="product[]">
    <option value="----Select Colour----">--- SELECT COLOUR ---</option>
    <option value="Oatmeal">Oatmeal</option>
    <option value="Derby Tweed">Derby Tweed</option>
    </select>
    <input type="image" src="http://www.biggerbids.com/members/images/23283/public/2732750_button.jpg";; Alt="Add to Cart" onclick="alert('This item has been added to your shopping cart\n\nPlease feel free to carry on Shopping or Checkout');">
    </form>

    Say if i want to add and 3.00 to a XLarge on top of the price of 32.95 and the total of 35.95 is automatically into the cart what would i need to put in that particular line? I just cant find the right way to go about it.

    <option value="XLarge(DONT KNOW WHAT TO PUT">XLarge(+&pound;3.00)</option>



    Dec 05 2011 16:41:24

    #2

    mrprez

    Join date : 2008-09-18      Posts : 19

    You'd have to do something like this:

    <select name="productpr">
    <option value="Musto Ocean Jacket, S:150"> Small </option>
    <option value="Musto Ocean Jacket, M:150"> Medium </option>
    <option value="Musto Ocean Jacket, L:150"> Large </option>
    <option value="Musto Ocean Jacket, XL:170"> Extra Large </option>
    </select>

    The 150 is the price for the S, > and L and the 170 is the price for the XL.



    Dec 05 2011 18:22:36

    #3

    SteveMck

    Join date : 2011-11-29      Posts : 19

    mrprez said You'd have to do something like this:

    <select name="productpr">
    <option value="Musto Ocean Jacket, S:150"> Small </option>
    <option value="Musto Ocean Jacket, M:150"> Medium </option>
    <option value="Musto Ocean Jacket, L:150"> Large </option>
    <option value="Musto Ocean Jacket, XL:170"> Extra Large </option>
    </select>

    The 150 is the price for the S, > and L and the 170 is the price for the XL.



    Thanks for the reply,

    I did see this but its trying to get it to work for me, im trying to alter the form to suit so will see how it goes



    Dec 05 2011 18:57:35

    #4

    mrprez

    Join date : 2008-09-18      Posts : 19

    Something like this will get you going:

    <form action="http://ww6.aitsafe.com/cf/add.cfm";;; method="post">
    <input type="hidden" name="userid" value="83447522">
    <input type="hidden" name="product[]" value="Wool Overs - Hillwalker ">
    <input type="hidden" name="nocart">
    <input type="hidden" name="return" value="www.countryclothingcompany.co.uk/hill-walker.html">;;
    <select name="productpr">
    <option value="----Select Size----">--- SELECT SIZE ---</option>
    <option value="Medium :32.95">Medium</option>
    <option value="Large :32.95">Large</option>
    <option value="XLarge :35.95">XLarge</option>
    </select>
    <select name="product[]">
    <option value="----Select Colour----">--- SELECT COLOUR ---</option>
    <option value="Oatmeal">Oatmeal</option>
    <option value="Derby Tweed">Derby Tweed</option>
    </select>
    <input type="image" src="http://www.biggerbids.com/members/images/23283/public/2732750_button.jpg";;; Alt="Add to Cart" onclick="alert('This item has been added to your shopping cartnnPlease feel free to carry on Shopping or Checkout');">
    </form>



    Dec 05 2011 19:18:05

    #5

    SteveMck

    Join date : 2011-11-29      Posts : 19

    Thanks for your help mrprez.
    All done, it now looks like this if anyone else gets a little stuck assuming i've done it right of course:

    <form action="http://ww6.aitsafe.com/cf/add.cfm";; method="post">
    <input type="hidden" name="userid" value="83447522">
    <input type="hidden" name="nocart">
    <input type="hidden" name="return" value="www.countryclothingcompany.co.uk/hill-walker.html">;
    <select name="productpr">
    <option value="----Select Size----">--- SELECT SIZE ---</option>
    <option value="Wool Overs - Hillwalker, Medium, :32.95">Medium</option>
    <option value="Wool Overs - Hillwalker, Large, :32.95">Large</option>
    <option value="Wool Overs - Hillwalker, XLarge, :35.95">XLarge (+3.00)</option>
    </select>
    <select name="product[]">
    <option value="----Select Colour----">--- SELECT COLOUR ---</option>
    <option value="Oatmeal">Oatmeal</option>
    <option value="Derby Tweed">Derby Tweed</option>
    </select>
    <input type="image" src="http://www.biggerbids.com/members/images/23283/public/2732750_button.jpg";;;; Alt="Add to Cart" onclick="alert('This item has been added to your shopping cart\n\nPlease feel free to carry on Shopping or Checkout');">
    </form>

    Seems to be working