Results 1 to 10 of 11

Hybrid View

  1. #1
    Join Date
    Apr 2007
    Posts
    22
    Plugin Contributions
    0

    Default Using fractions for product quantities

    I sell fabric and in the business people don't really use decimals to order, but more like ordering 3 1/3 of a yard or 3 3/4 of a yard. Can I setup the site to allow the customer to select the whole and fraction parts of the item they are buying?

    If not, how can I change the min, and units so someone can order any amount of fabric? When I use .125 as the min and 0 as the max, I can not use 0 as the units. If I select .125 then the customer can order every 1/8 of a yard, but not a 1/3 of a yard. Do I set the units to 0.01 or what?

    The best option would be the fractions, but how do I set that up?

    Thank you very much.

  2. #2
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Using fractions for product quantities

    You might try two dropdown attributes, one for whole numbers and one for fractions, and price by attributes. This would avoid having to enter every possible unit+fractional number in one list. It would require you to input the price for each number.

    Yards: [0 ($x.xx)]
    [1 ($x.xx)]
    [2 ($x.xx)]
    [3 ($x.xx)]
    [etc.]

    Fraction: [- (+$x.xx)]
    [1/8 (+$x.xx)]
    [1/4 (+$x.xx)]
    [1/3 (+$x.xx)]
    [1/2 (+$x.xx)]
    [5/8 (+$x.xx)]
    [2/3 (+$x.xx)]
    [3/4 (+$x.xx)]
    [7/8 (+$x.xx)]

    Another possibility that just occurred to me is using the standard quantity box for whole yards (set units to 1), and an attribute for the fraction which you set as a one-time charge. That way when they order 5 1/3 yards, they get charged for 5 units and a single 1/3 charge. (You would need to define the cost of each fraction.)
    Last edited by gjh42; 5 Jan 2008 at 09:39 AM.

  3. #3
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Using fractions for product quantities

    I'm not sure the one-time charge works for this scenario - I'll have to check up on it.

  4. #4
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Using fractions for product quantities

    I ran a test and this does work mostly as hoped.

    Make the product with a unit price and not "priced by attributes". Create a "Fraction" option name and the desired values 1/8, 1/4, 1/3, etc. Add those to the product without a price but with the one-time charge equal to the cost for the fraction.

    When you order a quantity of the item and select the "fraction" attribute, the fraction's cost is added to the total yardage cost (as a separate line item).

    If you put the same item in the cart again with a different fraction, it is treated as a different order, and the one-time charge is applied to the second item correctly. 5 1/3 + 5 1/2 --> 5 1/3 + 5 1/2.

    If you put the same item with the same fraction in the cart, it increases the unit quantity but leaves the single fraction as is. 5 1/3 + 5 1/3 --> 10 1/3.


    The alternative would be to allow units of .001 and maybe provide a little conversion chart. Not as neat for the fractions but totally functional for quantity.
    Last edited by gjh42; 5 Jan 2008 at 10:33 AM.

  5. #5
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Using fractions for product quantities

    Last thought on the subject...

    It would be possible to write a bit of code (javascript?) to interpret a number entered with fractions like 5 1/3 and then convert that to a real number for processing. Someone skilled in js would have to write that.

  6. #6
    Join Date
    Apr 2007
    Posts
    22
    Plugin Contributions
    0

    Default Re: Using fractions for product quantities

    Thank you very much.
    A couple of clarification questions:
    1. How would a customer order 1/2 yard. The option does not allow me to set the minimum to 0.
    2. I am sorry, but I have the zen-cart book, but I don't understand how to make that "fraction" option name. You said to assign a value or cost to each 1/8 yard. If I am selling 50 different fabrics and they are not the same cost for each 1/8 yard, will I have to make 7 fraction option names times the 50 items I have or how do I do that for each fabric.

    Thank you and sorry that I'm not understanding this.

    Thank you very much.

 

 

Similar Threads

  1. selling fractions for product quantity
    By Rinboonies in forum General Questions
    Replies: 5
    Last Post: 8 Dec 2011, 04:19 AM
  2. Unlimited product quantities for certain products
    By jcun45 in forum Setting Up Categories, Products, Attributes
    Replies: 5
    Last Post: 27 Dec 2010, 06:33 PM
  3. Using USPS single rate box for various quantities.
    By TimFromPhoenix in forum Built-in Shipping and Payment Modules
    Replies: 3
    Last Post: 4 Mar 2010, 04:30 AM
  4. Constarints for product quantities?
    By ccppll in forum Templates, Stylesheets, Page Layout
    Replies: 26
    Last Post: 3 Apr 2009, 02:17 PM
  5. Mulitple Quantities for One Product
    By rcarlyle in forum Setting Up Categories, Products, Attributes
    Replies: 2
    Last Post: 23 Mar 2008, 07:24 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