Results 1 to 7 of 7
  1. #1
    Join Date
    Feb 2011
    Posts
    207
    Plugin Contributions
    0

    Default QTY Discounts on Some Categories

    Am needing to set up a quantity discount on several categories. The built-in products price manager seems to be by product, but some of the categories have hundreds of products and did not see how to quickly assign discount to all the products. Installed the Quantity Discount add-on, but it seems I can select whether by product or category, but then if I select category it seems to be on all categories unless I am not understanding how to use it.

    What is the right method to use? Example, if there are 10 categories, I would like to apply the discount to only 5 or so of them (not all categories of products get discounts), and that at a category level so I don't need to modify thousands of products. I would be happy if that much could be accomplished, but if it could be determined that they bought 5 out of category A and 5 out of category B (discount begins at 10) is there a method that would also be able to combine any quantity of the categories tagged for discount till the threshold was reached?

    Any advice or instructions would be greatly appreciated, thank you.

  2. #2
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,622
    Plugin Contributions
    123

    Default Re: QTY Discounts on Some Categories

    My Quantity Discount mod has a category restriction exit - look in the help (link in your admin) for "exclude_category". Then instead of by product or category, discount by "all products in cart."
    That Software Guy. My Store: Zen Cart Modifications
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  3. #3
    Join Date
    Feb 2011
    Posts
    207
    Plugin Contributions
    0

    Default Re: QTY Discounts on Some Categories

    Thank you, am checking it out - from the FAQ section I found below. Is this what I need to do, and if so, how do I modify for more than one category? Currently we have 12 categories, 6 would need the discount. Is it better to mark the excluded ones or the ones included per the FAQ above this one in help . . . if so, same modification, how do I modify for more categories?

    Keep building the case statement? Not sure of the syntax to add more categories.

    Thank you very much.

    Q: I don't want discounts applied to items in category 7. How do I do this?
    A: Update the function exclude_category() in includes/modules/order_total/ot_quantity_discount.php as follows:

    function exclude_category($category) {
    switch($category) {
    case 7:
    return true;
    }
    return false;
    }

  4. #4
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,622
    Plugin Contributions
    123

    Default Re: QTY Discounts on Some Categories

    The FAQ shows both exclusions and inclusions. Do whichever one has fewer categories.

    I updated it to show multiple categories.
    That Software Guy. My Store: Zen Cart Modifications
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  5. #5
    Join Date
    Feb 2011
    Posts
    207
    Plugin Contributions
    0

    Default Re: QTY Discounts on Some Categories

    Excellent, thank you, have now modified the ot_quantity_discount.php to exclude the 6 categories and must be missing something still, it's not giving the discount yet. Have tried all 3 options for Discount Basis (total by category, total by item, total items in cart) am wanting total by item, assuming if they select excluded category items they would not count. Selected percentage for Discount Units, Counting Method - items, Discount Level 1-10, Discount Amount 1 - 20 (currently only need 1 level)

    Here is the modification.

    function exclude_category($category) {
    switch($category) {
    case 3:
    case 4:
    case 15:
    case 17:
    case 18:
    case 19:
    return true;
    }
    return false;
    }



    The help also says:

    If you have used exclude_category() or exclude_product(), the change to the table be built directly into the Example code you use. For category exclusions, change tpl_product_info_display.php from

    if ($discount->check() > 0) {


    to

    if ( ($discount->check() > 0) &&
    (!$discount->exclude_category($current_category_id)) ) {


    Is there something I'm missing doing, and which tpl_product_info_display.php file? I'm using the Bookshelf template and there is one in bookshelf/templates, and also found one in includes/templates/template_default/templates.

    Thank you again, I want them to be able to see the discount as it occurs, if possible, and not sure what I'm missing for the discount not to show in shopping cart.

  6. #6
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,622
    Plugin Contributions
    123

    Default Re: QTY Discounts on Some Categories

    Quote Originally Posted by sparrowce View Post
    Thank you again, I want them to be able to see the discount as it occurs, if possible, and not sure what I'm missing for the discount not to show in shopping cart.
    The discount doesn't show in the shopping cart; it shows on page 2 of checkout.
    That Software Guy. My Store: Zen Cart Modifications
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  7. #7
    Join Date
    Feb 2011
    Posts
    207
    Plugin Contributions
    0

    Default Re: QTY Discounts on Some Categories

    Ok, thank you, I didn't take the cart far enough in testing. It applied the right discount, excluded what needed to be excluded and gave the discount when the total of 10 items of non-excluded categories reached. Very nice, thank you, this is a very nice and useful add-on, thank you so kindly for sharing it and also assisting with implementation.

 

 

Similar Threads

  1. v154 "Qty Discounts Off Price" on Product page only displays one row of discounts
    By Zean in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 4
    Last Post: 23 Feb 2016, 06:52 AM
  2. v139h Display Attributes, Qty Discounts & Qty Box in a Table
    By pool27 in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 28 May 2014, 11:49 AM
  3. Display Attributes/Options, Qty Discounts & Qty Box in Matrix
    By teaj in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 21 Apr 2011, 02:59 PM
  4. Qty Discounts
    By dazed88 in forum Setting Up Specials and SaleMaker
    Replies: 1
    Last Post: 26 Dec 2007, 03:23 PM
  5. Display Qty Discounts
    By Fuzion in forum Setting Up Categories, Products, Attributes
    Replies: 2
    Last Post: 26 Sep 2006, 07:08 AM

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