SOS HELP NEEDED!!!

wvdz

No avatar

2006-11-17 19:00

Goodday people,

Does someone know how i can delete the entry-fields in the "order-form"?
I want only want the name and before name to be left. Although I work with php sometimes, I don't get how to do this.

Many thanks, you'll help is needed.

W from Holland

KiralyVlad

No avatar

2006-11-18 00:35

Take a look at templates/orders-delivery.tpl (i guess you mean the form where the customer has to enter his name, telephone number, e-mail and so on).... you will have something like this:

<tr>
<th>
$lang[Company]:
</th>
<td>
<input type="text" name="sCompanyName" value="$aData[sCompanyName]" maxlength="100" onblur="saveUserData( this.name, this.value )" />
</td>
</tr>

Just delete the entire <tr> ---> </tr> you don't need... I guess leaving the script untouched is the best, so only edit the template file.... you could also delete line from this (also in templates/orders_delivery.tpl:

Array( 'sFirstName' )
,Array( 'sLastName' )
,Array( 'sStreet' )
,Array( 'sZipCode' )
,Array( 'sCity' )
,Array( 'sTelephone' )
,Array( 'sEmail', 'email' )
,Array( 'iCourier', 'simple', '$lang[Choose_courier]' )
) );" id="oDeliveryForm">

wvdz

No avatar

2006-11-18 09:21

Thanks for your answer, but the "formcheck" will automatic say that some fields aren't filled in.
Because you deleted them?

KiralyVlad

No avatar

2006-11-18 10:10

Did you delete all the field you don't need from the formcheck ?
these lines:

Array( 'sFirstName' )
,Array( 'sLastName' )
,Array( 'sStreet' )
,Array( 'sZipCode' )
,Array( 'sCity' )
,Array( 'sTelephone' )
,Array( 'sEmail', 'email' )
,Array( 'iCourier', 'simple', '$lang[Choose_courier]' )
) );" id="oDeliveryForm">

and only leave the fields you need.... If you did, then go to core/products.php and look for this:

function checkOrderFields( $aForm ){
$aExp = explode( '|', $aForm['iCourier'] );
$aCourier = throwCourier( $aExp[0] );
if(
checkLength( $aForm['sFirstName'], 0 )
&& checkLength( $aForm['sLastName'], 0 )
&& checkLength( $aForm['sStreet'], 0 )
&& checkLength( $aForm['sZipCode'], 0 )
&& checkLength( $aForm['sCity'], 0 )
&& checkLength( $aForm['sTelephone'], 0 )
&& checkEmail( $aForm['sEmail'] )
&& isset( $aCourier )
)
return true;
else
return false;
} // end function checkOrderFields
}
?>

and delete the fields you don't need.

Back to top
about us | contact