Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  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.

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

    Default Re: Using fractions for product quantities

    1: Hmm yes that would be a problem. You can't order a quantity of none of a product, even if there is an attribute chosen that means 1/2 a yard.
    So i guess the yard quantity + one-time fraction is not going to work.
    That leaves attributes for both whole yards and fractions (or else finding a programmer to make a "fraction-reading" function).

    2: You can use one set of "fraction" option name and values for everything. The price is assigned to each product individually, in Attributes Controller.

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

    Default Re: Using fractions for product quantities

    Okay, sorry again, but do you mean create option values 1/8 to 7/8 and somehow attach whole numbers or do I do option values like:
    1/8, 1/4, 3/8, ...... 2 1/8, 2 1/4,..... all the way up to 20 if I want to sell 20 yards of fabric.

    Thank you.

  9. #9
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: Using fractions for product quantities

    or convert to all decimal admin > config > stock > Product Quantity Decimals > enter 2 or 3

    Then sell 20.125 or 5.5 or?
    Zen-Venom Get Bitten

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

    Default Re: Using fractions for product quantities

    Kits1 doesn't want decimals if at all possible.
    ---

    You would not need to have every fraction from 1/8 to 20 listed, just two dropdowns, one for whole numbers and one for fractions, as described in post 2:


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

    Fraction: [- (+$0.00)]
    [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)]

    Along with this, you would want to limit the "product quantity" to 1, so the customer doesn't order 3 times 3 1/4 yards. You do this in the product entry/editing page. The quantity box by the add button will disappear.

 

 
Page 1 of 2 12 LastLast

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