Forums / General Questions / please update your order Units errors -

please update your order Units errors -

Locked
Results 1 to 9 of 9
This thread is locked. New replies are disabled.
17 Sep 2007, 09:59
#1
geezer8998 avatar

geezer8998

New Zenner

Join Date:
Apr 2007
Posts:
9
Plugin Contributions:
0

please update your order Units errors -

hi, i am getting this message: Please update your order...Units errors -
You ordered a total of: 1 Units: 0


on the shopping cart page. How can i fix it?, thanks. wayne
17 Sep 2007, 11:04
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Posts:
31,500
Plugin Contributions:
4

Re: please update your order Units errors -

A url to this?

check in your product entry page for this product and the min, max, units - settings
19 Sep 2007, 03:51
#3
ajeh avatar

ajeh

Oba-san

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

Re: please update your order Units errors -

You cannot sell in 0 units ... this has to be > 0 ...
19 Sep 2007, 07:48
#4
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Posts:
10,620
Plugin Contributions:
212

Re: please update your order Units errors -

I have seen this before, and I believe it to be a bug in the Admin which masks the problem. Even if products.products_quantity_order_units is 0, it is displayed as 1 in the Admin during product edit.

Looking at admin/includes/modules/product/collect_info.php, line 378, if $pInfo->products_quantity_order_units == 0, 1 is displayed. This is misleading.

Geezer, to fix your problem:

- On the product info page, you will see (in the Add to Cart box) "Add to Cart: 1" with "Units: 0" below it. This is the trigger that you're in this state that Ajeh and Kobra are describing.
- You go to the admin for this product, and see that Product Qty Units is 1. It's really 0. Just go ahead anyway and update the product. The 0 will be overwritten with 1.
- Go back to the catalog product info page, refresh the page, and the Units: 0 should be gone.

Good luck,
Scott
19 Sep 2007, 14:51
#5
ajeh avatar

ajeh

Oba-san

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

Re: please update your order Units errors -

This is not a bug ... this is an auto fix for when you make errors and set unit to 0 and then edit the product later it fixes it automatically when set to 0 as this is wrong:
[PHP] <td class="main"><?php echo zen_draw_separator('pixel_trans.gif', '24', '15') . ' ' . zen_draw_input_field('products_quantity_order_units', ($pInfo->products_quantity_order_units == 0 ? 1 : $pInfo->products_quantity_order_units)); ?></td>
[/PHP]
19 Sep 2007, 14:54
#6
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Posts:
10,620
Plugin Contributions:
212

Re: please update your order Units errors -

Then it's a bug that zen_get_products_quantity_order_units() doesn't return the greater of 1 or the actual value of products_quantity_order_units.

If 0 is a buggy value, it should be treated as such throughout the system.

Scott
19 Sep 2007, 21:47
#7
ajeh avatar

ajeh

Oba-san

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

Re: please update your order Units errors -

It is not a bug ...

I am afraid we never thought anyone would even consider that you can order any product in units of 0 and that is why it defaults to 1 and only you the store owner could possibly change it to a value that mathmatically makes no sense and we have not added enough Protect the Store Owner from him/herself fixes ...

So no, mathmatically incorrect methods of entering values are not bugs ... we try to give people a little credit for being able to thing or else we have to test every single thing that you do and end up with an extra 100,000 lines of code ... :lamo:
19 Sep 2007, 22:03
#8
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Posts:
10,620
Plugin Contributions:
212

Re: please update your order Units errors -

Looking at the situation a different way:

- The storeowner is modifying the product. He has finger trouble. Accidentally the units get changed, and he doesn't notice.

- A customer then tries to order that product and can't.

- The storeowner looks at the admin, and it looks fine.

You are providing protection against this kind of error in the admin. I'm saying you should also provide it in the catalog, or not provide it in both places.
20 Sep 2007, 02:08
#9
ajeh avatar

ajeh

Oba-san

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

Re: please update your order Units errors -

When we have time to put in all the "Help Save Me from Myself" safeties ... we will be sure to do so ...

Thanks for your suggestions ...