Community Forums 

Main Content

Re:Discountpr with separate dropdown scodes?

    Apr 03 2017 07:15:29



    Join date : 2008-09-18      Posts : 2977

    A second question should have been why you want scode. Is it so that you see it in the order or do you want to use it with a Mals feature such as discounts?

    If you just want to see it you might try something on the lines of

    <form action=""; method="post">
    <input type="hidden" name="userid" value="xxxxx">
    <input type="hidden" name="return" value="www.yoursite.html">;
    <input type="hidden" name="product1" value="3 foot video cable" />3 foot video cable
    <input type="hidden" name="qty1" />
    <input type="hidden" name="noqty1" value="3" />

    <input type="hidden" name="discountpr1" value="4,13.00:5,12.00:15,11.00:1,10.00">

    <input type="text" name="qty2" onChange="qty1.value=qty2.value" />

    <select name="productpr2">
    <option selected>Choose colour</option>
    <option value="qty of red:0:0.19:scodered">red</option>
    <option value="qty of blue:0:0.19:scodeblue">blue</option>
    <option value="qty of green:0:0.19:scodegreen">green</option>

    <input type="submit" value="Add to Cart">

    This will give you a combined discount but the customer can't change the quantities in the cart. He can add a 'red' quantity twice but there would be separate lines. If you remove noqty he can change quantities in the cart but is reposnsible for making sure they add up.

    If you want multiple scodes but don't need discountpr on the whole order and wish to keep the single dropdown maybe you could set scode1 from scode2 - but I haven't checked if that works!.

    Some shipping help documents are available at