Community Forums 

Main Content

discount on product with different patterns.

    Dec 16 2009 16:03:28

    #1

    David H

    Join date : 2009-12-16      Posts : 24

    I have a question that i can't seem to find the answer to. i've looked at the forums and found similar questions but not exactly the same like this one:
    https://www.mals-e.com/viewtopic.php?id=6629&mid=6629&fid=2
    but the apparent solution leaves a messed up looking cart and the user can also mess up the cart.

    i started selling just one product which is covered with a fabric that the buyer can choose. i don't want a drop down box to choose the fabric, that is important. i want all the fabrics shown on the page and a buy now form under each one. i can do that fine. i also want to offer a quantity discount so in the cart i have set up a quantity discount so it adjusts in the cart. for instance, 1 costs 22, 2 cost 20 each, 3 cost 19 each etc. I had done that just fine and the cart worked well.

    here is the code for the buy buttons

    <form action="http://ww#.aitsafe.com/cf/add.cfm" method="post">
    <input name="userid" type="hidden" value="xxxxx" />
    <input name="product" type="hidden" value="Blanket Red Fabric"> (other buttons might have value "Blanket Black Fabric") and more
    <input name="price" type="hidden" value="22">
    <input name="units" type="hidden" value="1">
    <input name="return" type="hidden" value="xxxx.html">
    <input type="image" src="http://xxx.html/images.xxxx.gif"; name="submit">
    </form>

    i used the cart discount table...
    1 0 discount
    2 2 discount each
    3 3 discount each
    4 4 discount each

    now i am adding another separate product and i do NOT want the cart to discount it when adding it to the cart.

    here is the code for my new product that i am adding:

    <form action="http://ww#.aitsafe.com/cf/addmulti.cfm" method="post">
    <input name="userid" type="hidden" value="xxxxx" />
    Qty
    <select name="qty1">
    <option value="1">1</option>
    <option value="2">2</option>
    <option value="3">3</option>
    </select>
    <br>
    <select name="productpr1">
    <option value="Black Collar, 14-16in:6">14-16" $6.00</option>
    <option value="Black Collar, 16-18in:6.5">16-18" $6.50</option>
    <option value="Black Collar, 18-20in:7">18-20" $7.00</option>
    </select>
    <br>
    <input name="return" type="hidden" value="xxx.html">
    <input type="image" src="http://xxx.com/images/xxx.gif"; name="submit" title="Add to Cart">
    </form>

    here is my problem:

    for instance, if a customer puts two products in the cart covered by a fabric the cart should and does correctly discount $2 off each item but if they add a collar the cart now thinks because there are a total of 3 items in the cart and now discounts all three $3 off. i don't want that last product to be discounted or add to the discount of the first two.

    its a difficult situation because i want the cart to recognize that the fabric covered product is the same product no matter what the fabric choice is because i want that product only to be discounted if more are added.



    Dec 16 2009 17:11:54

    #2

    Debbie Q

    Join date : 2008-09-18      Posts : 4998

    Instead of the cart wide discount you need to use discountpr in your code. <INPUT TYPE="HIDDEN" NAME="discountpr" VALUE="1,22:1,20:1,19:1,whatever etc is">

    Instructions taken from Mal's support page.

    Quantity discounts
    You might want to offer a discount on a product as people buy more of it. To do this, instead of a single price, you pass in an array of price points in a field called discountpr. The syntax for the field is a little complicated at first glance.

    You can have an unlimited number of prices points, each one is separated by a comma. Each price point has a range and a price for the product, separated by a colon.

    <INPUT TYPE="HIDDEN" NAME="discountpr" VALUE="3,9.99:4,8.99:0,6.99">

    The above example means:

    if they order 3 or less the price is $9.99,
    if they order up to 4 more (i.e. 7), the price is $8.99,
    if they order more than 3 + 4, the price is $6.99.
    The last range always means "more than". It is set to 0 in the example above but in fact what you enter is simply ignored.

    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.




    Dec 16 2009 17:30:38

    #3

    David H

    Join date : 2009-12-16      Posts : 24

    thank you for your quick reply. i have thought of this but if i use separate buttons for each fabric then won't the cart only apply that discount to multiple quantities of that one fabric color?

    I think that my problem is that I want them to be treated as one product in the cart and for discounting purposes even though they have multiple colors possible, but i have them named differently in the code because i have a separate button for each color



    Dec 16 2009 18:39:24

    #4

    GT

    Join date : 2008-09-18      Posts : 3246

    If you're struggling with any of the discount forms on my page, email me and I'll see what I can build for you David.

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

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