Frequently Asked Questions

How to remove customer phone require, add email is require ?
add this code to end of file your_theme/functions.php

function custom_op_basic_customer_field($session_response_data){
    $name_field = array(
        'code' => 'name',
        'type' => 'text',
        'label' => "Full name",
        'options'=> [],
        'placeholder' => "Full name",
        'description' => '',
        'default' => '',
        'allow_shipping' => 'yes',
        'required' => 'no',
        'searchable' => 'no'
    );
    $email_field = array(
        'code' => 'email',
        'type' => 'email',
        'label' => 'Email',
        'placeholder' => 'Email',
        'description' => '',
        'default' => '',
        'allow_shipping' => 'no',
        'required' => 'yes',
        'searchable' => 'yes',
        'editable' => 'no'
    );
    $phone_field = array(
        'code' => 'phone',
        'type' => 'text',
        'label' => 'Phone',
        'placeholder' => 'Phone',
        'description' => '',
        'default' => '',
        'allow_shipping' => 'yes',
        'required' => 'no',
        'searchable' => 'yes'
    );
    $address_field = array(
        'code' => 'address',
        'type' => 'text',
        'label' => 'Address',
        'placeholder' => 'Address',
        'description' => '',
        'default' => '',
        'allow_shipping'=> 'yes',
        'required' => 'no',
        'searchable' => 'no'
    );
    $session_response_data['setting']['openpos_customer_basic_fields'] = array($name_field,$email_field,$phone_field,$address_field);
    return $session_response_data;
}
add_filter('op_get_login_cashdrawer_data','custom_op_basic_customer_field',20,1);
function custom_op_customer_require_phone($result,$phone){
    return false;
}
add_filter('op_customer_require_phone','custom_op_customer_require_phone',20,2);

Logout POS and Login POS again to see the effect.


 Last updated Wed, Sep 19 2018 6:50pm

Please Wait!

Please wait... it will take a second!