Page 1 of 2 12 LastLast
Results 1 to 10 of 15
  1. #1
    Join Date
    Aug 2017
    Location
    Eustis
    Posts
    7
    Plugin Contributions
    0

    Default Produt Qty displaying whole numbers(rouding up) need show actual qty on hand

    We have had our site up for several months but have found that when the qty in our instore system says 6.75 the zencart "Units in Stock" shows 7 and allows a person to place on order for more than we have on hand.

    We are running 1.5.5e
    PHP 5.6.7
    Yourstore Template from Perfectus. v2.3.7
    Instore to web is handled automatically by a script that runs every 8 min.
    The product qty is set for 2 decimal places.
    Do not to allow more than available is also active.
    Customers can order other than whole number(i.e 1.25, 1.5, 2.67...)

    I hope I covered everything for someone to offer a little guidance.

    Thanks

  2. #2
    Join Date
    Jul 2012
    Posts
    16,735
    Plugin Contributions
    17

    Default Re: Produt Qty displaying whole numbers(rouding up) need show actual qty on hand

    Status of check stock level and subtract stock? Both are found in configuration->stock.

    What are the settings for units and minimum quantity for the product?
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  3. #3
    Join Date
    Aug 2017
    Location
    Eustis
    Posts
    7
    Plugin Contributions
    0

    Default Re: Produt Qty displaying whole numbers(rouding up) need show actual qty on hand

    Both are set to "True".

  4. #4
    Join Date
    Aug 2017
    Location
    Eustis
    Posts
    7
    Plugin Contributions
    0

    Default Re: Produt Qty displaying whole numbers(rouding up) need show actual qty on hand

    Min and Max .25

  5. #5
    Join Date
    Jul 2012
    Posts
    16,735
    Plugin Contributions
    17

    Default Re: Produt Qty displaying whole numbers(rouding up) need show actual qty on hand

    Quote Originally Posted by tdbask View Post
    Both are set to "True".
    Well, in absence of any other information and it's been a while since I've compared 1.5.5e to 1.5.5f, but in 1.5.5f if I had product quantity decimals set to 2, a product set to a minimum of 0.01 and units set to 0.01, if I attempted to add more to the cart than was available, ZC notified me that the quantity added was set to the maximum and only allowed the maximum to be in the cart.

    Tried with a quantity of 10.97 and 0.97 being available.

    Would suggest at least using the includes/classes/shopping_cart.php file from 1.5.5f if you do nothing else.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  6. #6
    Join Date
    Aug 2017
    Location
    Eustis
    Posts
    7
    Plugin Contributions
    0

    Default Re: Produt Qty displaying whole numbers(rouding up) need show actual qty on hand

    I got thinking about the rounding up and down so I took a look at the ZEN database. I found all the entries to be whole numbers. I randomly checked selected stock codes with our in store system and found when an item in store says 2.42 on hand, in ZEN it shows 2. When the in store on hand reads 2.75, ZEN has 3.
    The "products_quantity" field in the "products" table is set for "Floating". Should it not be set for "Decimal" so as to not round?

  7. #7
    Join Date
    Jul 2012
    Posts
    16,735
    Plugin Contributions
    17

    Default Re: Produt Qty displaying whole numbers(rouding up) need show actual qty on hand

    Quote Originally Posted by tdbask View Post
    I got thinking about the rounding up and down so I took a look at the ZEN database. I found all the entries to be whole numbers. I randomly checked selected stock codes with our in store system and found when an item in store says 2.42 on hand, in ZEN it shows 2. When the in store on hand reads 2.75, ZEN has 3.
    The "products_quantity" field in the "products" table is set for "Floating". Should it not be set for "Decimal" so as to not round?
    Float supports decimal type numbers. The fact that they are rounded is because of something else. Something like a plugin or other code modification.

    Because you discuss a difference between what ZC reports and what is "in store", that makes me think you use something to "account" for the differences. It is that software that seems to be causing your issue. If as requested the posting tips were followed, then could help identify what is happening and perhaps why.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  8. #8
    Join Date
    Aug 2017
    Location
    Eustis
    Posts
    7
    Plugin Contributions
    0

    Default Re: Produt Qty displaying whole numbers(rouding up) need show actual qty on hand

    Thanks for the guidance. We've made no code changes so that would leave me with the interface script.
    I will send this issue to the folks who handle that script to see what they say.
    This has gotten me thinking that maybe I should look at the older database(we keep copies of everything) and see if this was happening before the last updates.

    Thanks again.

  9. #9
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,513
    Plugin Contributions
    88

    Default Re: Produt Qty displaying whole numbers(rouding up) need show actual qty on hand

    Out of curiosity (but not helping with your issue), what type of products do you sell where the quantities are normally fractional?

  10. #10
    Join Date
    Aug 2017
    Location
    Eustis
    Posts
    7
    Plugin Contributions
    0

    Default Re: Produt Qty displaying whole numbers(rouding up) need show actual qty on hand

    We sell fabric. Customers buy by the yard or fraction of. A customer could want 1.75 yrds. We allow them to order in .25 increments. But not all products are that way. A panel is sold as a whole unit. They cannot order .67 of a panel, although panel may be .67 of a yard (we've done that for them as we entered the item). That would be like printing only 2/3 of your picture. Panels are set to 1, so no fraction can be ordered.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v139h Display Attributes, Qty Discounts & Qty Box in a Table
    By pool27 in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 28 May 2014, 11:49 AM
  2. v151 Restrict Qty Box input to numbers
    By wacamatic in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 19 Nov 2012, 04:43 AM
  3. Display Attributes/Options, Qty Discounts & Qty Box in Matrix
    By teaj in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 21 Apr 2011, 02:59 PM
  4. Replies: 2
    Last Post: 2 Jun 2009, 05:51 AM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR