Community Forums 

Main Content

Adding items to cart and adjust qty instead of new line

    Jun 15 2010 13:32:25

    #1

    pcguy

    Join date : 2008-09-18      Posts : 130

    I have noticed if you have an item on your page and then add it to the cart via an add to cart button and you actually click on it twice or how ever many times you like it continues to add that item in the cart as a new line all the time.

    Is there a way to make it just adjust the quantity instead of adding the same item to the cart again on a new line.

    thanks



    Jun 15 2010 14:02:48

    #2

    Alan

    Join date : 2008-09-18      Posts : 2949

    If you can then use discountpr instead of price.

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




    Jun 21 2010 11:57:58

    #3

    pcguy

    Join date : 2008-09-18      Posts : 130

    Hi Alan,

    so looking at my code here how would I do that

    <form action="http://ww11.aitsafe.com/cf/addmulti.cfm"; method="post" target="viewer">
    <input name="userid" type="hidden" value="D612946" />




    <input type="Hidden" name="price1" value="10.50">
    <input type="Hidden" name="price2" value="9.50">
    <input type="Hidden" name="price3" value="9.50">
    <input type="Hidden" name="price4" value="9.50">
    <input type="Hidden" name="price5" value="9.50">

    <table style="font-size:12px" width="100%" cellpadding="2" cellspacing="2" border="0" bgcolor="#FFF1BF">
    <tr>
    <td width="67" bgcolor="ORANGE" valign=top><b>Image</b></td>
    <td width="67" bgcolor="ORANGE" valign=top><b>Quantity</b></td>
    <td width="125" bgcolor="ORANGE" valign=top><b>Color</b></td>
    <td width="162" bgcolor="ORANGE" valign=top><b>Code</b></td>
    <td width="162" bgcolor="ORANGE" valign=top><b>Price</b></td>

    </tr>
    <tr>
    <td rowspan="5" valign=top><img src="images/bci6-set.gif" width="90" height="80"></td>

    <td width="67" valign=top>
    <select name="qty1">
    <option VALUE="0">0</option>
    <option VALUE="1">1</option>
    <option VALUE="2">2</option>
    <option value="3">3</option>
    <option value="4">4</option>
    <option VALUE="5">5</option>
    <option VALUE="6">6</option>
    <option value="7">7</option>
    <option value="8">8</option>
    <option VALUE="9">9</option>
    <option value="10">10</option>
    </select>
    </td>
    <td width="125" valign=top>Large Black</td>
    <input type="hidden" name="product1" value="Compatible BCI-3e">
    <td width="125" valign=top>BCI-3e</td>
    <td width="125" valign=top>$10.50</td>
    </td>
    </tr>
    <tr>

    <td width="67" valign=top>
    <select name="qty2">
    <option VALUE="0">0</option>
    <option VALUE="1">1</option>
    <option VALUE="2">2</option>
    <option value="3">3</option>
    <option value="4">4</option>
    <option VALUE="5">5</option>
    <option VALUE="6">6</option>
    <option value="7">7</option>
    <option value="8">8</option>
    <option VALUE="9">9</option>
    <option value="10">10</option>
    </select>
    </td>
    <td width="125" valign=top>Yellow</td>
    <input type="hidden" name="product2" value="Compatible BCI-6Y">
    <td width="125" valign=top>BCI-6Y</td>
    <td width="125" valign=top>$9.50</td>
    </td>
    </tr>
    <tr>


    <td width="67" valign=top>
    <select name="qty3">
    <option VALUE="0">0</option>
    <option VALUE="1">1</option>
    <option VALUE="2">2</option>
    <option value="3">3</option>
    <option value="4">4</option>
    <option VALUE="5">5</option>
    <option VALUE="6">6</option>
    <option value="7">7</option>
    <option value="8">8</option>
    <option VALUE="9">9</option>
    <option value="10">10</option>
    </select>
    </td>
    <td width="125" valign=top>Magenta</td>
    <input type="hidden" name="product3" value="Compatible BCI-6M">
    <td width="125" valign=top>BCI-6M</td>
    <td width="125" valign=top>$9.50</td>
    </td>
    </tr>
    <tr>


    <td width="67" valign=top>
    <select name="qty4">
    <option VALUE="0">0</option>
    <option VALUE="1">1</option>
    <option VALUE="2">2</option>
    <option value="3">3</option>
    <option value="4">4</option>
    <option VALUE="5">5</option>
    <option VALUE="6">6</option>
    <option value="7">7</option>
    <option value="8">8</option>
    <option VALUE="9">9</option>
    <option value="10">10</option>
    </select>
    </td>
    <td width="125" valign=top>Cyan</td>
    <input type="hidden" name="product4" value="Compatible BCI-6C">
    <td width="125" valign=top>BCI-6C</td>
    <td width="125" valign=top>$9.50</td>
    </td>
    </tr>
    <tr>

    <td width="67" valign=top>
    <select name="qty5">
    <option VALUE="0">0</option>
    <option VALUE="1">1</option>
    <option VALUE="2">2</option>
    <option value="3">3</option>
    <option value="4">4</option>
    <option VALUE="5">5</option>
    <option VALUE="6">6</option>
    <option value="7">7</option>
    <option value="8">8</option>
    <option VALUE="9">9</option>
    <option value="10">10</option>
    </select>
    </td>
    <td width="125" valign=top>Small Black</td>
    <input type="hidden" name="product5" value="Compatible BCI-6BK">
    <td width="125" valign=top>BCI-6BK</td>
    <td width="125" valign=top>$9.50</td>
    </td>
    </tr>
    <tr>


    <td width="67" valign=top> </td>
    <td width="67" valign=top></td>
    <td width="125" valign=top></td>
    <td width="162" valign=top></td>
    <td width="162" valign=top align="right">

    <input type="image" name="Submit" src="images/cart.gif" alt="ADD TO ORDER" class="small" />
    </td>
    </tr>

    </table>
    </form>



    Jun 21 2010 13:07:39

    #4

    Alan

    Join date : 2008-09-18      Posts : 2949

    Change
    <input type="Hidden" name="price1" value="10.50">
    to
    <input type="Hidden" name="discountpr1" value="0,10.50">
    etc..

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

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