Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  1. #1

    Default Quantity Discounts not calculating correctly using mixed attribs

    Hello all. I'm using the built in quantity discounts feature of Zencart. For some reason, I'm having issues though with the discount calculation.

    example. I have a product that goes from 18.50 to 18.00 when you buy 6 or more.

    If I purchase 3 of one attribute set, it sets the 3 at 18.50 each (correct).
    If I then purchase 3 more of another attribute set (color, size), then those 3 are correctly priced at 18.00 each, but the previous 3 remain at 18.50 each (incorrect).

    If, on the other hand, I purchase 6 of one attribute set, then the cost is correctly calculated at 18.00 each.

    Using zencart 1.3.6.

    Any advice would be appreciated.

  2. #2
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Quantity Discounts not calculating correctly using mixed attribs 1.3.6

    Have you an URL to this product that we could peek at please?
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  3. #3

    Default Re: Quantity Discounts not calculating correctly using mixed attribs 1.3.6

    sure:

    http://www.weecarediapercompany.com/...products_id=90

    you can choose a combination of small blue and small forest.

    If you select 6 of either one, you get the correct discount. If you split them 3 of each.. well.. you'll see... :)

  4. #4

    Default Re: Quantity Discounts not calculating correctly using mixed attribs 1.3.6

    a small addition. we have 5 different products with the same pricing / discount structure and they're all having the same problem.

  5. #5

    Default Re: Quantity Discounts not calculating correctly using mixed attribs 1.3.6

    one other addition.

    if you add an unrelated item to the cart, then the discount is removed entirely. not even the 3 which were correct will show the discounted value.

    if you then add another of the same discounted product, that single one will show the correct discounted price, but not the other two attribute groups.

    very strange.

  6. #6
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Quantity Discounts not calculating correctly using mixed attribs 1.3.6

    Are you using a Stock-handling add-on for this?

    I have not seen a problem with Product Quantity Discounts ...

    I set up this same scenario without a stock track and no problems ... at least I am guessing that color list with the quantities means something?
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  7. #7

    Default Re: Quantity Discounts not calculating correctly using mixed attribs 1.3.6

    the only stock add-on we're using is the Stock By Attributes. I've asked in that support thread and apparently it doesn't touch the quantity discount functionality.

    I've been using winmerge to try to find some changes in the various php files that could be causing the issue, but I'm having a difficult time following the program flow after the add to cart button is clicked and how it then refreshes the prices with quantity discount taken into account. Not sure which php is responsible for doing the recalc and re-display of the item costs.

    As a test earlier today, I installed a new version of zencart 1.3.8, connected it to a copy of the current database. I upgraded the database to 1.3.8 and installed only the Stock By Attributes add-on.

    Same problem.

  8. #8

    Default Re: Quantity Discounts not calculating correctly using mixed attribs 1.3.6

    ok, now I'm stuck.

    I've uploaded and installed a fresh copy of zen cart 1.3.8a.
    I've let it create a brand new database.
    I've added one product with a quantity discount applied.
    It does NOT work.

    Fresh database. Fresh cart. Still unable to calculate qty discounts properly.

    I think I've eliminated the program and any possible database corruption. Where do I look next?

    Could there be something on the server?

    http://www.weecarediapercompany.com/store

  9. #9
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Quantity Discounts not calculating correctly using mixed attribs 1.3.6

    try this edit:

    /includes/classes/shopping_cart.php
    at lines 1401 and 1435 you have code that looks like this:
    Code:
        // reset($this->contents); // breaks cart
        $check_contents = $this->contents;
        while (list($products_id, ) = each($check_contents)) {
    add an extra line in both places, making it look like this:
    Code:
        // reset($this->contents); // breaks cart
        $check_contents = $this->contents;
        reset($check_contents);
        while (list($products_id, ) = each($check_contents)) {
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  10. #10

    Default Re: Quantity Discounts not calculating correctly using mixed attribs 1.3.6

    That was the solution!!!

    Has this issue not come up before? Are we selling in an unusual way? Either way, I'm very grateful for your solution!!!

    Thank you very much!!!!

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v151 Quantity Discounts With Mixed Attributes, Priced by Attribute
    By kgamadia in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 7 Oct 2014, 07:29 PM
  2. Sub Total not calculating correctly with quantity discounts
    By tbaquatics in forum All Other Contributions/Addons
    Replies: 3
    Last Post: 16 Nov 2009, 10:38 PM
  3. Replies: 5
    Last Post: 10 Sep 2009, 10:33 PM
  4. Replies: 2
    Last Post: 1 Feb 2009, 08:11 PM
  5. Replies: 11
    Last Post: 7 Mar 2008, 02:10 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