Foxy Forum Status

We're no longer responding to questions via our forum, but we will keep it up for historical reasons. If you can't find the answer you're looking for, please visit our knowledge base or contact us. If there's enough interest in the future, we may bring the forum back.

Product specific variables around minimum quantities and such

Hey guys

we have a customer who has some unique conditions for her products. She has minimum quantities, product increments and a bulk discount per product. (Minimum order 500 books. Over 500 add increments of 100 (600, 700, etc)
See below for order of 2500 books or more at discounted price.)

We can manage this at the moment for the front end of the website with javascript on the quantities and the price to set the restrictions correctly. The problem is as soon as the products are in the cart, how do we keep customers from futzing with it to break it (or get a discount on low quantities)

Am I correct in assuming we can add some custom javascript to the cart to put this in place?

Also, the discount minimums and increments can change from product to product. Is this info we can pass through to the shopping cart to utilize for the custom javascript as well?

  • fc_adamfc_adam FoxyCart Team

    Good question. You can add any custom javascript you want on the cart and checkout - so that could definitely be a possibility. You could also edit the cart include template to change what form element is presented to the customer for the products. For example, you could show a select element instead of a text input.

    For having products that have different requirements for bundling - you could approach that by passing a variable into the cart with the product that denotes what it's increments are.

    Perhaps a simpler solution though - you could set up the products so that 1 product quantity is a bundle of 100. So instead of the customer needing to specify in multiples of 100, they could just specify 1 and the product would be for 100 of that item. For the one you detailed, you could then set the product's quantity_min to be 5, so that the customer has to order at least 5 - which would equate to 500.
  • Thanks @fc_adam

    The bundling would work for the quantities issue, but that still leaves the price difference. Is there a snippet similar to the flat rate shipping snippet that can be used to modify the pricing based on qty?

  • fc_adamfc_adam FoxyCart Team

    Sorry for not addressing that above - you can alter a product's pricing based on quantity with product level discounts:
  • @fc_adam - no worries.

    With the discounts, is there a way to pass the discount variable with the product info? I want to try and simplify the process for my client so that they don't have to add a new discount every time they have a different bulk pricing change - does that make sense?
  • fc_adamfc_adam FoxyCart Team

    Yep - that's a product level discount. Take a look at those docs and it will detail that. There are three different levels of discounts - product, category and coupon. Coupons are added by the customer on the cart or checkout - but can be added automatically using custom javascript. Category level are set on the category and apply to all products within that category, and product level apply to just one product and are added with the add to cart.
Sign In or Register to comment.