Community Forums 

Main Content

Discountpr with separate dropdown scodes?

    Apr 02 2017 12:26:08

    #1

    Rich-OVM

    Join date : 2011-07-04      Posts : 5

    Instead of having a scode for just the main product - is it possible to have a separate scode for each option while using discountpr?

    Current form:

    <form action="http://ww7.aitsafe.com/cf/add.cfm"; method="post" target="cart"
    onsubmit="if(this.qty.value<1){alert('Please enter the quantity required then press the Add to Cart button!');this.qty;return false;}">
    <input type="hidden" value="xxxxxxxx" name="userid">Enter Quantity<br><input size="6" name="qty"><p>
    <input type="hidden" value="3 Foot Video Cable" name="product[]">
    Select Color:<select name="product[]">
    <option value="Red"> Red </option>
    <option value="Green"> Green </option>
    <option value="Blue"> Blue </option>
    </select>
    <input type="hidden" name="discountpr" value="4,13.00:5,12.00:15,11.00:1,10.00">
    <input type="hidden" name="scode" value="VIDEOCABLE3">
    <input type="hidden" name="units" value=".19">
    <input type="image" src="../images/bu/addtocart.jpg" alt="Add To Cart">
    </form>


    Future Form basic idea:

    <form action="http://ww7.aitsafe.com/cf/add.cfm"; method="post" target="cart"
    onsubmit="if(this.qty.value<1){alert('Please enter the quantity required then press the Add to Cart button!');this.qty;return false;}">
    <input type="hidden" value="xxxxxxxx" name="userid">Enter Quantity<br><input size="6" name="qty"><p>
    <input type="hidden" value="3 Foot Video Cable" name="product[]">
    Select Color:<select name="product[]">
    <option value="Red" input type="hidden" name="scode" value="VIDEOCABLE3-RED"> Red </option>
    <option value="Green" input type="hidden" name="scode" value="VIDEOCABLE3-GREEN"> Green </option>
    <option value="Blue" input type="hidden" name="scode" value="VIDEOCABLE3-BLUE"> Blue </option>
    </select>
    <input type="hidden" name="discountpr" value="4,13.00:5,12.00:15,11.00:1,10.00">
    <input type="hidden" name="units" value=".19">
    <input type="image" src="../images/bu/addtocart.jpg" alt="Add To Cart">
    </form>


    Thanks in advance!



    Apr 02 2017 20:47:48

    #2

    Alan

    Join date : 2008-09-18      Posts : 2944

    Are you wanting discountpr to apply to the total qty of all three colours?
    4 red, 4 green, and 4 blue to be charged at the 12 qty rate?

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




    Apr 02 2017 22:21:13

    #3

    Rich-OVM

    Join date : 2011-07-04      Posts : 5

    Discount for 3 colors combinations is not necessary - but I'd be curious to see the solution on how to do both scenarios. Thanks!



    Apr 03 2017 05:13:21

    #4

    GT

    Join date : 2008-09-18      Posts : 3202

    If I want to order 5 of each color, I have to visit the page 3 times, what a waste for a potential buyer, you need to give the buyer the chance to order everything they want with one click.

    As Alan has asked, if I order 4 of each, will you want the buyer to get the 12 discount?

    Having trouble with a form or need one building?
    Fast turnaround, but I do charge :)

    Mal's Forms / Scripts and the syntax are here.




    Apr 03 2017 07:15:29

    #5

    Alan

    Join date : 2008-09-18      Posts : 2944

    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="http://ww7.aitsafe.com/cf/addmulti.cfm"; 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>
    </select>

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

    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!.

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




    Apr 03 2017 10:18:50

    #6

    Rich-OVM

    Join date : 2011-07-04      Posts : 5

    In my initial example I simplified the scodes and options. In reality there are 8 to 10 colors of each cable type and 8 to 10 lengths. Our scodes are more advanced than the simplified example in my first post and allow us to discount say just blue cables - or just 3 foot cables - etc. depending on inventory levels etc. through Mals Discount Coupons. We also use the scodes to track item sales on the backend for accounting. inventory, etc.

    Our current website does not allow for mixing of the colors to receive the quantity discount and this has not ever been an issue in the 15 to 20 years. It would be nice to be able to do offer mixed colors at a discount but it would still have to be by the same length only.

    Our cart has a "close window and return shopping" button that returns shoppers right back where they were so it is only a one button push to get back and add more.

    The reason I was looking for a solution is that we are in the process of changing our site to a more multiple platform/mobile friendly site. Right now each cable and each length is listed individually and this takes up some real estate on the pages - we were looking for options/solutions to reduce page space.

    I usually have no problem figuring this stuff out, but just can not wrap my head around discountpr with multiple scodes in a dropdown scenario.



    Apr 03 2017 14:22:54

    #7

    GT

    Join date : 2008-09-18      Posts : 3202

    I suggest building a script to do exactly what you're after, one button passes all selections and scodes to Mals.

    Having trouble with a form or need one building?
    Fast turnaround, but I do charge :)

    Mal's Forms / Scripts and the syntax are here.




    Apr 03 2017 16:46:37

    #8

    Rich-OVM

    Join date : 2011-07-04      Posts : 5

    Just so I'm clear - There is no way to pass a single option with scode from a dropdown that has multiple options (each with it's own scode) using discountpr, without a custom script?



    Apr 03 2017 17:36:18

    #9

    Alan

    Join date : 2008-09-18      Posts : 2944

    I think you are correct.

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




    Apr 03 2017 17:44:43

    #10

    Alan

    Join date : 2008-09-18      Posts : 2944

    Possibly a sledge hammer approach but you could have three dropdowns.

    Cable type and length takes you to a specific page on which all colour combinations are defined, each as a product with its own scode.

    That page has a colour dropdown, a name="quantity" box and a Buy button. .Use a script to set the appropriate qtyn value to that in the quantity box, based on the colour selection.

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