Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2009
    Location
    North Idaho, USA
    Posts
    1,948
    Plugin Contributions
    1

    Default Discount value not properly calculated when non-discounted item added to cart

    I could use some expert help, please

    ZC156c
    php 7.3.20
    maria 10.3.23

    plugins that I think may affect price calculations:
    Dynamic Price Updater
    Quantity Discounts
    OPC

    Discount coupon setup (admin:discounts:coupon admin)
    Deny ALL
    Category #1 ALLOW 20% discount
    Category #2 ALLOW 20% discount

    • When items from either, and/or both categories are in cart, discount is calculated correctly
    • IF an item from a 'non-discounted' category is added to cart, discount is calculated correctly
    • WHEN the quantity of that same 'non-discounted' item is increased to satisfy a Quantity Discount, the discount coupon value shown at checkout changes, ie: is reduced by a value that I have not yet associated with anything.


    I do not recall zc154 never having this issue and we use similar discount/coupon structures frequently. This just happens to be the first since upgrading to 156c

    Order Total: in sort order

    ot_quantity discount
    ot_subtotal
    ot_shipping
    ot_coupon
    ot_group pricing
    ot_tax
    ot_loworderfee
    ot_gv
    total

    In my example
    product 1: $32.24 discounted 20%
    product 2: $134.46 discounted 20%
    product 3: $213.15 quantity discounted 5%

    coupon discount should be $33.34
    quantity discount should be $10.66

    coupon discount changes to $31.08 when product 3 (qty 5) is in cart
    coupon discount shown correctly is $33.34 when product 3 (qty 4 or less) is in cart
    Rick
    ChainWeavers (dot) com

  2. #2
    Join Date
    Jul 2012
    Posts
    15,190
    Plugin Contributions
    17

    Default Re: Discount value not properly calculated when non-discounted item added to cart

    What happens if the quantity_discount module is in some way placed below the coupon order total module?

    Fyi, Dynamic Price Updater does not offer any "changes" beyond the display of information on the PRODUCT_TYPE_info page and even then it is for display only without any actual change to the cart or what it or the order total modules calculate upon/in checkout. It may help "reveal" information about the end price, but doesn't modify it.

    Obviously would also suggest running through a "checkout" with OPC temporarily disabled to likely show that it doesn't have an effect.

    My guess is that between the calculated discount and the customer's price that some aspect of that is modifying the values seen in the coupon order total module against which to apply the discount and that it is in essence reducing the amount of money to come off because of that... Haven't run the "numbers" though. I would think that the test above may reveal that "fact" or issue and from there a solution that continues to support "the old way" can be determined even if it is a special or one-off solution.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...
    Upgraded to Zen Cart V1.5.3 from V1.5.1 from V1.5.0 from V1.3.9h

  3. #3
    Join Date
    Aug 2009
    Location
    North Idaho, USA
    Posts
    1,948
    Plugin Contributions
    1

    Default Re: Discount value not properly calculated when non-discounted item added to cart

    Quote Originally Posted by mc12345678 View Post
    What happens if the quantity_discount module is in some way placed below the coupon order total module?

    My guess is that between the calculated discount and the customer's price that some aspect of that is modifying the values seen in the coupon order total module against which to apply the discount and that it is in essence reducing the amount of money to come off because of that... Haven't run the "numbers" though. I would think that the test above may reveal that "fact" or issue and from there a solution that continues to support "the old way" can be determined even if it is a special or one-off solution.
    Calculations seem to be correct if ot_quantity discount is applied after ot_coupon.

    Since ot_quantity code hasn't changed and you seem to say the zc core has a 'new way' of doing things, then the new way of doing things must have had a bug introduced.

    Product with qty discounts are completely unrelated to coupon discounts so that makes no sense to me.
    Rick
    ChainWeavers (dot) com

  4. #4
    Join Date
    Aug 2009
    Location
    North Idaho, USA
    Posts
    1,948
    Plugin Contributions
    1

    Default Re: Discount value not properly calculated when non-discounted item added to cart

    I understand that bugs happen and they cant be squished if no one knows they exist.
    Rick
    ChainWeavers (dot) com

 

 

Similar Threads

  1. v153 QTY Discount shown but not applied when added to cart
    By RixStix in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 6
    Last Post: 13 Jul 2014, 04:37 PM
  2. Item value charging twice when added to cart
    By Bikebits4you in forum Basic Configuration
    Replies: 4
    Last Post: 8 Jan 2010, 02:10 PM
  3. Attribute is Being Discounted with Item, Instead of Being Added on After Discount
    By alexiscreations in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 9 Oct 2009, 04:00 AM
  4. Item Not Discounted Once Attributes & Options are Added
    By micadelic in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 30 Aug 2009, 05:27 AM
  5. Cart Total not calculated properly
    By kotharisa in forum Currencies & Sales Taxes, VAT, GST, etc.
    Replies: 2
    Last Post: 17 Sep 2008, 07:12 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR