Change mandatory fields in order form

sebriel

Avatar: sebriel

2014-08-21 00:07

Hello from Argentina!!! I need some help here, im trying to disable some mandatory fields of order form such zip code, city, or street, so the people can continue without filling those. I have try deleting DIVS from order-step-2.php, but when it try to go on, a message to fill those fields appear.

Does anybody know what should i need to change:
1- to make fields not mandatory
2- to delete them

Help!!

» Quick.Cart v6.x

sebriel

Avatar: sebriel

2014-08-21 04:08

OK, i think i figure it out, i hope this help more people.... and sorry for my english

First you have to go to orders.php located in core folder. This is part of the code people don't see at the front-end.
then you will have to jump to function

 
Checks order fields
  
* @return bool
  
* @param array  $aForm
  
*/
  public function 
checkFields$aForm ){
    if(      
checkFormFields $aForm, Array( 'sFirstName' => true'sLastName' => true'sPhone' => true'sEmail' => Array( 'email' ), 'sComment' => Array( 'textarea'false ) ), true )
      && isset( 
$sPrice )
      && ( ( isset( 
$aForm['iRules'] ) && isset( $aForm['iRulesAccept'] ) ) || !isset( $aForm['iRules'] ) )
    ){
      return 
true;


right there you will see the fields (name, city, street, tel, and so) In this example i've deleted the city, zip code, and street... so the only fields that will require to be checked are those i leave.
there you can delete the fields you don't need

---------------

Then, you will have to go to order-step-2.php
There you will see the div tags that are the ones you have at the front-end of the order form.

Just delete the div tags you don't need... example:

<div id="city">
                <label for="oCity"><?php echo $lang['City']; ?><span>(<?php echo $lang['required']; ?>)</span></label>
                <input type="text" name="sCity" value="" maxlength="40" class="input" onblur="saveUserData( this.name, this.value )" id="oCity" alt="simple" />
              </div>



And there you go...

Back to top
about us | contact