6 replies [Last post]
druru's picture
Offline
Brain Stormer
Joined: 08/08/2007
Juice: 228
Was this information Helpful?

Right now the qty field for a product is set to 3 digits which means 999 is the max qty of an item you can purchase. Is there a way to reconfig that to be 4 or 5 digits (9999 or 99999).

thanks

michels's picture
Offline
Uber DonorBug FinderInternationalizationizer
Joined: 08/12/2007
Juice: 205
change uc_product.module: lin

change
uc_product.module:
line 868:

<?php
'#maxlenght' => 3
?>

by the way: the qty field at product-page isn't limited.
Ryan, I think the maxlenght-attribute should be removed in the next versions.

druru's picture
Offline
Brain Stormer
Joined: 08/08/2007
Juice: 228
thanks bud. i'm wondering if

thanks bud.

i'm wondering if this could be implementd via a setting because it breaks upgrades.

or possibly a custom module that adjusts that sucker on the fly - nodeapi? hook_form?

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: change uc_product.module: lin

Hmm... yeah, may as well remove it (or at least make it large enough to handle anyone's needs but keep it from exceeding the data type used in the DB).

druru's picture
Offline
Brain Stormer
Joined: 08/08/2007
Juice: 228
Re: Re: change uc_product.module: lin

does that mean i should make the temporary change (i probably don't need it right this minute) or are you going to bump the limit to match the db in the near future?

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: Re: Re: change

Maxlengths have been updated to 6 and I'm putting in an error check in uc_cart.module to keep things from breaking... I broke the Livetest by trying to buy something near 9 trillion tin can telephones. Eye-wink

It's in the latest dev branch.

druru's picture
Offline
Brain Stormer
Joined: 08/08/2007
Juice: 228
Re: Re: Re: Re: change

very good! thanks