Zen Cart Logo
Forums / Bug Reports / Quantity Units errors, even when there is not

Quantity Units errors, even when there is not

Locked

Views: 2,221

Results 1 to 9 of 9
This thread is locked. New replies are disabled.
27 Sep 2007, 4:20 PM
#1
infocom avatar

infocom

Zen Follower

Join Date:
Jul 2006
Location:
Cardiff, Wales
Posts:
308
Plugin Contributions:
0

Quantity Units errors, even when there is not

Hi

I get this problem/error below. I dont know how to fix it because I dont see a problem! I have set products up to have a minimum quantity of 0.1 with units of 0.1, but I regularly get the error below saying theres a mistake even though there is not. e.g. the below error is when someone orders 1.2 which is obviously divisible by 0.1 units so there shouldn't be an error. I am using Zen 1.3.0. Thanks.

Please update your order ...
Product Name: Cafe Net (Diana) ... Quantity Units errors -
You ordered a total of: 1.2 Min: 0.1 Units: 0.1 *Mixed Option Values is ON

27 Sep 2007, 4:29 PM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Quantity Units errors, even when there is not

You are running a very very old version of Zen Cart ... the current version is Zen Cart v1.3.7.1 ...
http://www.zen-cart.com/forum/showthread.php?t=69769

I cannot recall all of the bugs and security issues in v1.3.0 as it has been so long ago that I do not even have a copy loaded right now ...

This does not have a problem in the current version and I am thinking it is your old version ...

You should really consider upgrading for all of the bug fixes, security issues, additional features etc. that have been added since that old version ...

27 Sep 2007, 4:34 PM
#3
infocom avatar

infocom

Zen Follower

Join Date:
Jul 2006
Location:
Cardiff, Wales
Posts:
308
Plugin Contributions:
0

Re: Quantity Units errors, even when there is not

Hi Ajeh, yes I know. But there's quite a few mods on the site for certain customer requirements, so upgrading is too big a job for the client to want at the moment.

27 Sep 2007, 4:36 PM
#4
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Quantity Units errors, even when there is not

Does it attempt to fix the quantity in the shopping cart?

27 Sep 2007, 4:41 PM
#5
infocom avatar

infocom

Zen Follower

Join Date:
Jul 2006
Location:
Cardiff, Wales
Posts:
308
Plugin Contributions:
0

Re: Quantity Units errors, even when there is not

No. Strangely I notice this occurs when I have 3 products, each with a quantity of 0.4 (1.2 in total), whereas when I change the quantity of one of them tp say 0.3 (making 1.1 in total) the error goes. The error doesnt just appear for these amounts but for other various ones too, so it pops up occasionally for clients.

27 Sep 2007, 4:52 PM
#6
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Quantity Units errors, even when there is not

How about an URL to this Product so I can see it? :smile:

27 Sep 2007, 9:06 PM
#7
infocom avatar

infocom

Zen Follower

Join Date:
Jul 2006
Location:
Cardiff, Wales
Posts:
308
Plugin Contributions:
0

Re: Quantity Units errors, even when there is not

Sorry been out... here's the link. Just buy this product 3 times say, each with the same quantity (width). I just did some tests and it looks like if you have 3x the same product, each with same quantity (width) it gives the error. To get 3 products you have to choose 3 different attributes (Approx Drop).

http://www.curtainsonthenet.co.uk/index.php?main_page=product_info&products_id=449&cPath=2

28 Sep 2007, 3:38 AM
#8
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Quantity Units errors, even when there is not

Find the function fmod_round in the files:
/includes/functions/functions_general.php
/admin/includes/functions/general.php

and replace the function with:

// replacement for fmod to manage values < 1
  function fmod_round($x, $y) {
    $zc_round = $x/$y;
    return (float) ($x - (((int)($zc_round)) * $y));
  }

See if this doesn't correct the error for you ...

Moving to Bug Fixes ...

28 Sep 2007, 4:06 AM
#9
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Quantity Units errors, even when there is not

Scratch that idea ... just made a new error ... :oops: