Community Forums 

Main Content

Problem with discountpr

    Feb 18 2014 18:33:46

    #1

    KalCollections

    Join date : 2008-09-18      Posts : 7

    Has anyone noticed a recent change in the behavior of discountpr? Back in January I switched to using "discountpr" instead of "price", as in:

    <input type='hidden' name='discountpr' value='0,39.99'>

    in order to coalesce cart entries and quantities when the same item is added to the cart multiple times.

    Back then it worked fine (unless I'm going mad). But when I test it now, as expected each item has only one entry in the cart, HOWEVER the quantity is not being incremented (e.g., it remains at "1").

    My products donít have any options or variants, and Iím testing by clicking on the same ďadd to cartĒ button from the same web page:

    www.kalcollections.com/store/index.htm

    Thoughts?



    Feb 18 2014 19:01:05

    #2

    Debbie Q

    Join date : 2008-09-18      Posts : 4994

    I would try removing the [ ] symbols from the product name and see if you still have a problem. If you do I would email Mal directly.

    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.




    Feb 18 2014 20:02:16

    #3

    KalCollections

    Join date : 2008-09-18      Posts : 7

    Thanks, Debbie Q, for the quick reply. No luck, however - same behavior with "[ ]"s removed.

    My use of those square brackets in the description string is part of a Mal's/LinkLok workaround from long ago, hasn't changed in years.



    Feb 18 2014 20:51:13

    #4

    Alan

    Join date : 2008-09-18      Posts : 2951

    Have you always used scodes? I think they interact with discountpr with a shared scode resulting in two different products being combined. Not sure what other interactions there are.

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




    Feb 18 2014 23:02:56

    #5

    KalCollections

    Join date : 2008-09-18      Posts : 7

    Thanks for the tip, Alan! The problem is definitely tied to the use of scodes. Using a simplified test page, if I remove the scode field from the form, I get the correct discountpr behavior in the cart. Re-adding an scode breaks it. Can someone verify this?

    The scode values for my products havenít changed in years. Given the state of my brain, itís possible that my initial discountpr tests back in January were wrong, but Iíll ping Mal just in case there were any recent changes made on the server side.

    Ironically, in some cases this current behavior might actually be useful, for me at least. Many of my products are downloads, for which a quantity > 1 doesnít make sense. Right now thereís no other way(?) to force multiple ďaddsĒ of the same item to be a single line item with quantity 1. Using noqty=2 doesnít cut it, since the quantity still gets incremented.



    Feb 19 2014 10:05:04

    #6

    Mal Stewart

    Join date : 2008-09-18      Posts : 135

    Yes, there was a little change about a month ago. Yes, it does only work with the use of an scode.

    The change was made in response to a number of merchants using Optioncart whereby additional products were unintentionally being added to the cart. I tracked it down to multiple clicks to add items for the same product. My guess is that it was something to do with the way Optioncart works with some browsers. Since I can't fix Optioncart though, I decided to fix it by blocking the subsequent clicks for the same product. The fix worked.

    In effect it means, if you are using discountpr with an scode then the quantity box has to be part of the Buy Now button, it has to be on your website.

    Mal's E-commerce Ltd
    http://www.mals-e.com




    Feb 20 2014 19:20:25

    #7

    KalCollections

    Join date : 2008-09-18      Posts : 7

    Thanks for the info, Mal. I may end up coding to this new behavior, so if any future fixes are going to affect it please let us know.