Results 1 to 8 of 8

Hybrid View

  1. #1
    Join Date
    May 2009
    Posts
    8
    Plugin Contributions
    0

    Default Trouble with quantity discounts

    Hi! I am trying to use quantity discounts. This is the quantity discount feature that comes with Zen Cart, not any sort of add-on module. I am using version 1.3.8a with php 5.2.9. The basic problem is that although the proper discounts show up as a table at the bottom of the product page, they are not appropriately reflected in the shopping cart when the products are added.

    I have read through several of the existing posts on quantity discounts and found the "known bug" fix in which you edit the shoping_cart.php file. I have done that. The affected parts of that file, as they currently stand for my shop are pasted in below. I really hope I did something wrong with that -- please let me know!


    // reset($this->contents); // breaks cart
    $check_contents = $this->contents;
    reset($check_contents);
    while (list($products_id, ) = each($check_contents)) {
    $test_id = zen_get_prid($products_id);
    if ($test_id == $chk_products_id) {
    $in_cart_mixed_qty_discount_quantity += $check_contents[$products_id]['qty'];
    }
    }
    return $in_cart_mixed_qty_discount_quantity;
    }
    /**
    * Method to calculate the number of items in a cart based on an abitrary property
    and

    // reset($this->contents); // breaks cart
    $check_contents = $this->contents;
    reset($check_contents);
    while (list($products_id, ) = each($check_contents)) {
    $test_id = zen_get_prid($products_id);
    if ($test_id == $chk_products_id) {
    $in_cart_mixed_qty += $check_contents[$products_id]['qty'];
    }
    }
    return $in_cart_mixed_qty;
    }
    /**
    * Method to calculate item quantity, bounded the mixed/min units settings
    The specific quantity discount settings that I have, for a representative product, are listed below. This is intended to give a 7 cent discount for 300 or more, and 14 cents for 600 or more. Base price is $1.40.

    Discount Qty Applies to Mixed Attributes: No
    Discount Type: Amount off Discount Priced from: Price

    Level Min Qty DiscVal CalcPrice ExtendedPrice
    Discount 1 300 0.0700 $1.33 x 300 = $399.00
    Discount 2 600 0.1400 $1.26 x 600 = $756.00

    If you want to see this in action, you can look at the following product page. Before adding anything to the cart, be sure you put something in the space provided for "Enter File URL" since that is a required text attribute.

    http://www.podscriptgenie.com/index....&products_id=6

    I feel like I must be missing something really obvious with this. I would appreciate any help or suggestions anyone can offer!!

    Thanks, and best wishes,

    Kate

  2. #2
    Join Date
    May 2009
    Posts
    8
    Plugin Contributions
    0

    Default Re: Additional Testing Reveals....

    Hi -- me again.

    I experimented around a little bit more and found that if I choose an attribute for that product, this causes some sort of error in the price calculation such that the price gets doubled.

    The "product" I'm selling is transcription services. The base price for the product I referred to above is $1.40 / audio minute. If I add an attribute that should raise that to $1.50 / audio minute, it shows up in the cart as costing $2.80 / audio minute.

    Any ideas??

    Any help or suggestions appreciated!

    Thanks,

    Kate.

  3. #3
    Join Date
    May 2009
    Posts
    8
    Plugin Contributions
    0

    Default Re: Trouble with quantity discounts

    Sorry for this whole chain of posts. I should add that this doubling problem never showed up before trying to do the quantity discounts. We've had a lot of orders placed before then that used the attributes, and they were all fine.

    Thanks!

  4. #4
    Join Date
    May 2009
    Posts
    8
    Plugin Contributions
    0

    Default Re: Trouble with quantity discounts

    I guess this has stumped everyone? Or did I post this problem to the wrong part of the forum? I seem to have a talent for posting things to the wrong area. If someone can let me know if I need to repost somewhere else, I'd appreciate it!

    Thanks!

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

    Default Re: Trouble with quantity discounts

    What happens if you switch to the Classic Template?

    Does it work?
    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!]
    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!

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

    Default Re: Trouble with quantity discounts

    Also, do you have Price by Attributes turned on? If so, can you turn that off ...
    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!]
    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
    Join Date
    May 2009
    Posts
    8
    Plugin Contributions
    0

    Default Re: Trouble with quantity discounts

    OH. MY. GOD. I am officially awed.

    I looked and, indeed, I had priced by attributes turned on. I barely even remember setting it up to be priced by attributes once upon a time -- I can't imagine diagnosing that just from the mystifying symptoms I described! I went in and unchecked that, and it seems to work perfectly now.

    Thank you so much! Just a sec here -- I'm clicking on that link to buy coffee and donuts. You're amazing.

 

 

Similar Threads

  1. v139h Quantity Discounts with salesmaker
    By dmagic in forum General Questions
    Replies: 3
    Last Post: 25 Jun 2013, 09:34 PM
  2. Specials with (native) Quantity Discounts
    By chadderuski in forum Setting Up Specials and SaleMaker
    Replies: 1
    Last Post: 4 Jul 2011, 06:24 AM
  3. NEW to Zen Cart -Trouble with Discounts
    By yanith in forum Customization from the Admin
    Replies: 3
    Last Post: 13 Jan 2011, 02:42 AM
  4. Quantity discounts with product attributes
    By claynomi in forum Setting Up Specials and SaleMaker
    Replies: 0
    Last Post: 26 Aug 2009, 05:43 PM

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