How to disable adding more that one?

ppl

No avatar

2005-10-17 14:26

How to make shop work like every product's stock would be one? I mean customer could add product only once to basket.

ppl

No avatar

2005-10-18 10:22

Never mind. I already figured this out.

Cabbe

No avatar

2005-10-18 15:14

how did you do it? i need to do the same

ppl

No avatar

2005-10-18 22:39

Well I am not really programmer but this seems to work. I edited orders-ff.php file and function dbAddBasketProduct like this:

if( $aExp[1] == $iOrder && $aExp[2] == $aProduct['id'] ){
if( $aExp[3] < 1) {
$aFile[$i] = $aExp[0].'$'.$aExp[1].'$'.$aExp[2].'$'.sprintf( '%01.0f', $aExp[3] + $iQuantity ).'$'.$aExp[4]."$\n";
$bExist = true;
}
else{
$aFile[$i] = $aExp[0].'$'.$aExp[1].'$'.$aExp[2].'$'.$aExp[3].' 6;'.$aExp[4]."$\n";
$bExist = true;
}
}

ppl

No avatar

2005-10-18 22:48

Sorry, some typing error....

else{
$aFile[$i] = $aExp[0].'$'.$aExp[1].'$'.$aExp[2].'$'.$aExp[3].' 6;'.$aExp[4]."$\n";
$bExist = true;
}

Back to top
about us | contact