The Foxy forums are on the move!

We're in the process of moving our forums over to a new system, and so these forums are now read-only.
If you have a question about your store in the meantime, please don't hesitate to reach out to us via email.

Quntity discount for specific product

fc_joshfc_josh FoxyCart Team
in Help edited August 2010
I know it is possible to add quantity discounts to categories, but is it possible to add quantity discounts for a specific product? If so, how?

  • brettbrett FoxyCart Team
    Hi Josh.
    Yup, you sure can. Rather than putting the quantity discount on the category you put it on the product just like any other product option.
  • fc_joshfc_josh FoxyCart Team
    We are using the fake form code. Will this conflict with adding discounts or attributes in the link? I am trying it, but now the product isn't being added to the cart. Below is the code:
    <p> </p>
    <div class="product_left">
    <!--IMAGE -->
    <div class="image"><img alt="" src="/Websites/greatplainsgraphics/Images/Client%20Stores/Saints%20Medical/3800.jpg" /></div>
    <div class="product_right">
    <!-- PRICE -->
    <div class="price">$9.25</div>
    <!-- DETAILS -->
    <div class="details">
    <strong>Quantity Discounts</strong><br />
    - 201-400 ($8.72)<br />
    - 401-600 ($7.85)<br />
    - 601-800 ($7.50)
    <div class="foxycart_form">
    <!-- HIDDEN FIELDS -->
    <input type="hidden" value="Saints Medical" name="client" />
    <!-- QUANTITY -->
    <div class="label">QTY</div>
    <div class="quantity"><input type="text" value="1" name="quantity" /></div>
    <!-- SIZE -->
    <div class="label">Size</div>
    <select name="size">
    <option selected="selected" value="choose">[ Please Select ]</option>
    <option value="S">S</option>
    <option value="M">M</option>
    <option value="L">L</option>
    <option value="XL">XL</option>
    <option value="2X">2X</option>
    <option value="3X">3X</option>
    <!-- COLOR -->
    <div class="label">Color</div>
    <select name="color">
    <option selected="selected" value="choose">[ Please Select ]</option>
    <option value="Sand" class="sand">Sand</option>
    <!-- LINK -->
    <a class="add_to_cart foxycart foxycart_submit" href=";price=9.25&amp;discount_quantity_amount=Quantity Discount{allunits|201-.53|401-1.40|601-1.75}"></a>
    <div class="clear"></div>
  • brettbrett FoxyCart Team
    Try the updated code and if it's still not working let me know.
  • fc_joshfc_josh FoxyCart Team
    The updated code fixed the original issue, but I still have the issues mentioned above.

  • brettbrett FoxyCart Team
    You have that page live where we can take a look?
  • brettbrett FoxyCart Team
    Ok, the issue is that you're using the "fake form" script:
    When you use that, it's all or nothing. The link needs to just point to the cart, without any extra parameters like name, price, or discounts. All those need to go in hidden inputs. Anything you put on the link itself will be blown away when the fake form script runs. I've updated the wiki with a note about that.

    Thanks for pointing it out.
  • fc_joshfc_josh FoxyCart Team
    So where do I plug in the quantity discounts if everything in the URL will be canceled? BTW, I tried the new fake form code for V7. it adds the product to the cart ok, but the cart doesn't load in the Lightbox.

  • lukeluke FoxyCart Team
    Hey Josh. You'll need to add those as hidden form inputs, just like any other input:
    <input type="hidden" name="discount_quantity_amount" value="Quantity Discount{allunits|201-.53|401-1.40|601-1.75}" />
    <input type="hidden" name="name" value="3800" />
    <input type="hidden" name="price" value="9.25" />

    I'm not sure about why the cart modal window wouldn't show up in 070 (did you follow the upgrade instructions?), but maybe Brett has some ideas on that.
  • fc_joshfc_josh FoxyCart Team
    That worked perfect. Thank you so much. I will try again on V7. As always, you guys rock.

Sign In or Register to comment.