Looking for help?
< All Topics
Print

Can you give me a code to leave in client fields just Name, Address, and Number.


function op_custom_customer_field_google_address_data($session_response_data){
   
   
    $name_field =  array(
        'code' => 'name',
        'type' => 'text',
        'label' => __('Name','openpos'),
        'options'=> [],
        'placeholder' => __('Name','openpos'),
        'description' => '',
        'default' => '',
        'allow_shipping' => 'yes',
        'required' => 'no',
        'searchable' => 'no'
    );
    
      $phone_field = array(
        'code' => 'phone',
        'type' => 'text',
        'label' => __('Phone','openpos'),
        'options'=> array(),
        'placeholder' => __('Phone','openpos'),
        'description' => '',
        'default' => '',
        'allow_shipping' => 'yes',
        'required' => 'yes',
        'searchable' => 'yes'
      );
       
      $email_field = array(
        'code' => 'email',
        'type' => 'email',
        'label' => __('Email','openpos'),
        'options'=> array(),
        'placeholder' => __('Email','openpos'),
        'description' => '',
        'default' => '',
        'allow_shipping' => 'no',
        'required' => 'no',
        'searchable' => 'yes',
        'editable' => 'no'
      );
       $address_field = array(
         'code' => 'address',
         'type' => 'text',
         'label' => __('Address','openpos'),
         'options'=> array(),
         'placeholder' => __('Adress','openpos'),
         'description' => '',
         'default' => '',
         'allow_shipping'=> 'yes',
         'required' => 'no',
         'searchable' => 'no'
       );
        
      
    $addition_checkout_fields = array();
    
    $addition_checkout_fields[] = $address_field;
    
    $session_response_data['setting']['openpos_customer_fields'] = array($name_field,$phone_field);
    $session_response_data['setting']['openpos_customer_addition_fields'] = $addition_checkout_fields;

    return $session_response_data;
}
add_filter('op_get_login_cashdrawer_data','op_custom_customer_field_google_address_data',10,1);
Previous Alway active gift option in checkout
Next Change distance in addon “OpenPos Secure – Allow login store location only”
Table of Contents
[elementor-template id="5546"]