Community Forums 

Main Content

some items discounted, some not

    Aug 07 2009 02:34:51

    #1

    Matte

    Join date : 2008-11-02      Posts : 27

    To start, I have read this very useful page http://www.tne.co.uk/mals/ but have not found the answer to my particular need.

    I have set up volume discounts via the admin, but of course this applies the everything in the cart. What I am needing is for some items (the artwork) to be discounted, but the poster prints not.

    Here is a simplified version (it is normally served through integration in an SQL database, as we have 7 artists selectable on each of the three currencies order pages)

    ====================

    <form action="http://ww9.aitsafe.com/cf/addmulti.cfm"; method="post"><input type="hidden" name="return" value=

    "www.caricatureking.com/"; /><input type="hidden" name="userid" value="B525045" />


    <table id="buy" summary="buy caricatures online">

    <tr>

    <td colspan="3">

    <div class="subhead"><span style="color:#ff0000">Step 3</span> Choose your caricature product here</div>

    </td>

    </tr>

    <tr>

    <td id="buy1" valign="top" width="12%"><b>No of people</b></td>

    <td id="buy1" valign="top" width="48%"><b>Product</b></td>

    <td id="buy1" valign="top" width="30%"><b>Price</b></td>

    </tr>

    <tr>

    <td valign="top" width="12%">

    <input type="hidden" name="product1[]" value="Digital head/shoulders color caricature with draft by Rick" />

    <input type="hidden" name="price1" value="39.99" />

    <input size="2" type="text" name="qty1" value="0" /></td>

    <td valign="top" width="48%">Digital head/shoulders color caricature with draft by Rick</td>

    <td valign="top" width="30%"><b>USD 39.99</b> per person</td>

    </tr>
    <tr>

    <td valign="top" width="12%">

    <input type="hidden" name="product2[]" value="Digital full body colour caricature with minor prop and one draft by Rick" />

    <input type="hidden" name="price2" value="75.00" />

    <input size="2" type="text" name="qty2" value="0" /></td>

    <td valign="top" width="48%">Digital full body colour caricature with minor prop and one draft by Rick</td>

    <td valign="top" width="30%"><b>USD 75.00</b> per person</td>

    </tr>
    <tr>

    <td valign="top" width="12%">

    <input type="hidden" name="product3[]" value="Digital full body and background with props color caricature with draft by Rick" />

    <input type="hidden" name="price3" value="100.00" />

    <input size="2" type="text" name="qty3" value="0" /></td>

    <td valign="top" width="48%">Digital full body and background with props color caricature with draft by Rick</td>

    <td valign="top" width="30%"><b>USD 100.00</b> per person</td>

    </tr>
    </table><br />
    <input type="hidden" name="product8[]" value=
    "12x16 inch poster print" /><input type="hidden" name="price8"
    value="30.00" /><input type="checkbox" name="qty8" value=
    "1" />12x16 inch poster print <b>US$30.00</b>
    <br />
    <input type="hidden" name="product9[]" value=
    "16x20 inch poster print" /><input type="hidden" name="price9"
    value="35.00" /><input type="checkbox" name="qty9" value=
    "1" />16x20 inch poster print <b>US$35.00</b><br />



    <div class="subhead"><span class="red">Step 5</span> <input type="submit" value="Complete your order" /><input type="reset" value="Reset" /></div><br />



    Pay by Credit card, PayPal or MoneyBoookers <br />
    <small><span class="red">Note!</span> <b>If paying by credit card your statement will show Plus One Marketing</b>.<br /></small></form>



    Aug 07 2009 05:03:52

    #2

    GT

    Join date : 2008-09-18      Posts : 3207

    Why not use: http://www.tne.co.uk/mals/discount-not-on-extras.html

    You've placed some chars that aren't required in your form ---> [] see if this works, I've discount
    1.00 off each purchase, 1 = full amount, 2 = 1.00 less, 3 = 1.00 less.

    Leave the qty text box to "" and not "0".

    <form action="http://ww9.aitsafe.com/cf/addmulti.cfm"; method="post">
    <input type="hidden" name="return" value="www.caricatureking.com/"; />
    <input type="hidden" name="userid" value="B525045" />

    <table id="buy" summary="buy caricatures online">
    <tr><td colspan="3">
    <div class="subhead"><span style="color:#ff0000">Step 3</span> Choose your caricature product here</div>
    </td></tr>
    <tr>
    <td id="buy1" valign="top" width="12%"><b>No of people</b></td>
    <td id="buy1" valign="top" width="48%"><b>Product</b></td>
    <td id="buy1" valign="top" width="30%"><b>Price</b></td>
    </tr><tr>
    <td valign="top" width="12%">
    <input type="hidden" name="product1" value="Digital head/shoulders color caricature with draft by Rick" />
    <input type="hidden" name="price1" value="39.99" />
    <input type="hidden" name="discountpr1" value="1,39.99:2,38.99:3,37.99">
    <input size="2" type="text" name="qty1" value="0" />
    </td>
    <td valign="top" width="48%">Digital head/shoulders color caricature with draft by Rick</td>
    <td valign="top" width="30%"><b>USD 39.99</b> per person</td>
    </tr>
    <tr>
    <td valign="top" width="12%"><input type="hidden" name="product2" value="Digital full body colour caricature with minor prop and one draft by Rick" />
    <input type="hidden" name="discountpr2" value="1,75.00:2,74.00:3,73.00">
    <input size="2" type="text" name="qty2" value="" />
    </td>
    <td valign="top" width="48%">Digital full body colour caricature with minor prop and one draft by Rick</td>
    <td valign="top" width="30%"><b>USD 75.00</b> per person</td>
    </tr><tr>
    <td valign="top" width="12%"><input type="hidden" name="product3" value="Digital full body and background with props color caricature with draft by Rick" />
    <input type="hidden" name="discountpr1" value="1,100.00:2,99.00:3,98.00">
    <input size="2" type="text" name="qty3" value="" />
    </td><td valign="top" width="48%">Digital full body and background with props color caricature with draft by Rick</td>
    <td valign="top" width="30%"><b>USD 100.00</b> per person</td>
    </tr></table>
    <br /><input type="hidden" name="product8" value="12x16 inch poster print" />
    <input type="hidden" name="price8"value="30.00" />
    <input type="checkbox" name="qty8" value="1" />12x16 inch poster print <b>US$30.00</b>
    <br />
    <input type="hidden" name="product9" value="16x20 inch poster print" />
    <input type="hidden" name="price9"value="35.00" />
    <input type="checkbox" name="qty9" value="1" />16x20 inch poster print <b>US$35.00</b>
    <br />
    <div class="subhead"><span class="red">Step 5</span>
    <input type="submit" value="Complete your order" />
    <input type="reset" value="Reset" /></div>
    <br />Pay by Credit card, PayPal or MoneyBoookers<br />
    <small><span class="red">Note!</span> <b>If paying by credit card your statement will show Plus One Marketing</b>.<br /></small>
    </form>

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

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




    Aug 07 2009 06:40:02

    #3

    Matte

    Join date : 2008-11-02      Posts : 27

    Yes my brain is catching up - I found this also through further reading and I think it will work.
    One thing needed by me was to divorce myself from the cart discount method.
    The [] are there as they were needed at some time following some setup process.
    A few hours will see if this will work
    thanks



    Aug 24 2009 23:09:01

    #4

    Matte

    Join date : 2008-11-02      Posts : 27

    OK, this is where I am up to with this.
    I find that if a qty of 3 is entered, then the cart shows an incorrect value.
    Even using the amended script above, the cart also shows only the discount for 2 items, even if there are 3 items in the cart.

    Any ideas? here is a live link to test if helpful http://www.caricatureking.com/AATEST.php



    <form action="http://ww9.aitsafe.com/cf/addmulti.cfm"; method="post"><input type="hidden" name="return" value=
    "www.caricatureking.com/"; /><input type="hidden" name="userid" value="B525045" />

    <a href="http://www.caricatureking.com/zalo-samples.php">;(See samples of Zalo's work)</a><br />
    <br />
    <table id="buy" summary="buy caricatures online">
    <tr>
    <td colspan="3">
    <div class="subhead"><span style="color:#ff0000">Step 3</span> Choose your caricature product here</div>

    </td>
    </tr>
    <tr>
    <td id="buy1" valign="top" width="12%"><b>No of people</b></td>
    <td id="buy1" valign="top" width="48%"><b>Product</b></td>
    <td id="buy1" valign="top" width="30%"><b>Price</b></td>
    </tr>
    <tr>
    <td valign="top" width="12%">
    <input type="hidden" name="product1[]" value="Test product" />
    <input type="hidden" name="discountpr1" value="1,10.00:2,9.00:3,8.00" />
    <input size="2" type="text" name="qty1" /></td>
    <td valign="top" width="48%">Test product</td>

    <td valign="top" width="30%"><b>USD 10.00</b> per person</td>
    </tr>
    <tr>
    </table><br />

    <br />
    <br />
    <div class="subhead"><span class="red">Step 5</span> <input type="submit" value="Complete your order" /><input type="reset" value="Reset" /></div><br />

    </form>



    Aug 25 2009 05:26:02

    #5

    GT

    Join date : 2008-09-18      Posts : 3207

    Don't forget that discountpr is done by adding, this is how you've set it up.

    The first one is 10.00
    The next two are 9.00 so three are charged at 9.00
    The next three and any number after that are charged at 8.00

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

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




    Aug 25 2009 12:01:41

    #6

    Matte

    Join date : 2008-11-02      Posts : 27

    THANK YOU!!

    It had to be something blindingly simple....

    A request/suggestion GT - if you are the author of this excellent guide http://www.tne.co.uk/mals/ - perhaps on the example of this array, to mention the accumulation aspect ;)



    Aug 25 2009 20:03:57

    #7

    GT

    Join date : 2008-09-18      Posts : 3207

    Hmmm, good point, I can't find anywhere on Mals help where it tells you this point!

    The site does actually tell you about discountpr...
    http://www.tne.co.uk/mals/syntax.html

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

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