Page 1 of 2 12 LastLast
Results 1 to 10 of 18
  1. #1
    Join Date
    May 2006
    Posts
    1
    Plugin Contributions
    0

    Default Fractional Quantities

    Hi Folks

    I have played with several Carts system such as OSC, etc... I need a cart that allows fractional quantities ie: .25 of a meter for fabric , etc. The value could be anything from .25 to xxx.75

    Can this be done in ZenCart? Do I need a mod? Wher are the MOD's/Contributions found?

    In OSC is was able to get it to work with some coding changes:
    1. Changed customers_basket_quantity in the customers_basket table to DECIMAL 15,4 format.
    2. Changed products_quantity in the orders_products table to DECIMAL 15,4 format.
    3. Changed products_quantity in the products table to DECIMAL 15,4 format.
    4. In catalog/includes/classes/shopping_cart.php changed:

    CODE
    reset($this->contents);
    while (list($key,) = each($this->contents)) {
    if ($this->contents[$key]['qty'] < 1) {
    unset($this->contents[$key]);

    Any help would be appreciated.

    Dan
    Canada

  2. #2
    Join Date
    Feb 2005
    Location
    Manchester ~ UK
    Posts
    130
    Plugin Contributions
    0

    Default Re: Fractional Quantities

    This can be changed in Admin> Config> Stock, you can set the decimal place in there so the cart accepts decimal quantities.

    Hope this helps, I had the same need as you.

  3. #3
    Join Date
    Feb 2005
    Location
    Manchester ~ UK
    Posts
    130
    Plugin Contributions
    0

    Default Re: Fractional Quantities

    Having said this, I am still not allowed to process through the shopping cart system.

    Perhaps this will have to be a hack also.

    Can anyone clarify how this can be done?

    Many thanks,

  4. #4
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Fractional Quantities

    You can use decimals on quantity if you:

    1 turn on the number of decimals you wish to use

    2 set the minimum/units in the Product to allow for these decimals

    If the minimum is 1 and you are allowed to order .25 ... you need to be able to order with a minimum of .25 ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  5. #5
    Join Date
    May 2006
    Posts
    98
    Plugin Contributions
    0

    Re: Fractional Quantities

    I have the same issue - we sell in minimum of 1/2 yard quantities. I've set the config-stock-product quantity decimals to 2, and all of my products sold by 1/2 yard have the minimum/units set as such. However, when the stock gets sold down to 0.5 yards, the product is marked out of stock. So, folks aren't able to purchase that last 0.5 yard of fabric or trim. Is there another place I need to fiddle with to make this work?

    Thanks so much!

  6. #6
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Fractional Quantities

    Is everything like this? Where 0 is the absolute bottom line?

    Do you have your products show as Sold Out or do you have them set to products_status = 0 so they do not show in the shop?
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  7. #7
    Join Date
    May 2006
    Posts
    98
    Plugin Contributions
    0

    Default Re: Fractional Quantities

    Thanks for clarifying Ajeh - I mis-wrote. I have Product Status set to 0 when out of stock. Is there something I'm missing to fix this?

  8. #8
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Fractional Quantities

    Currently the reset on stock is < 1 but in your case you need <= 0 ...

    This has been changed for the next release ...

    You can edit the /includes/classes/orders.php and change the line around 688:
    PHP Code:
              if ($stock_left 1) { 
    To read:
    PHP Code:
              if ($stock_left <= 0) { 
    See if that takes care of this for you ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  9. #9
    Join Date
    May 2006
    Posts
    98
    Plugin Contributions
    0

    Default Re: Fractional Quantities

    Thanks Linda - that one seems to be working now. I just had to manually re-activate those products in the Admin section and all is well.

    But, now I have a new problem (!) that I seem to have caused myself... When folks place a quantity larger than what we have in stock, it is no longer giving them the warning on the checkout page. Instead, they click on checkout and it just send them right back - an infernal loop. The warning was there before, but I must have done something to make it go away. Can you help me recover what I've done?

  10. #10
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Fractional Quantities

    If you flip to classic does it fix it?

    Do you have a click for click to produce this issue?
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. gateways? fractional quantities?
    By cygnus in forum General Questions
    Replies: 2
    Last Post: 17 Nov 2010, 03:49 PM
  2. Can I add Fractional Qty's?
    By pumsd in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 29 Apr 2010, 03:15 AM
  3. Fractional Quantity Rounding Price
    By christianpatrick in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 1 Apr 2009, 03:57 PM
  4. Fractional product quantities
    By Jack000 in forum Setting Up Categories, Products, Attributes
    Replies: 2
    Last Post: 25 Jan 2008, 02:36 PM
  5. [Done v1.3.7] Error when setting fractional quantity.
    By millo_magno in forum Bug Reports
    Replies: 5
    Last Post: 7 Mar 2007, 05:55 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