CS CART Vendor user creation via custom code – Multi Vendor Version


Hi there,

Today we will take a look about the user creation via code.

create a php file what ever you wants from the root of the cs cart folder.


define('AREA', 'A');
define('AREA_NAME', 'admin');
define('ACCOUNT_TYPE', 'admin');
require dirname(__FILE__) . '/prepare.php';
require dirname(__FILE__) . '/init.php';
$user_data['company'] = "Test";
$user_data['status'] = "D";
$user_data['company'] = "Test";
$user_data['lang_code'] = "EN";
$user_data['commission'] = "";
$user_data['commission_type'] = "";
$user_data['email'] = "manisanjai@gmail.com";
$user_data['phone'] = "9944509663";
$user_data['url'] = "";
$user_data['fax'] = "";
$user_data['address'] = "test, Test street";
$user_data['country'] = "IN";
$user_data['state'] = "Tamilnadu";
$user_data['zipcode'] = "6000028";
$user_data['company_description'] = "Test Company";
$user_data['categories'] = "";
$user_data['shippings'] = '';
$result = fn_update_company($user_data);
echo $result; // You can get the results.
}

Just copy and paste this code to your php file. Then execute the file from the browser. You can get the result as an array with user id and profile id.

That’s All.

I hope it helps some one.

Thanks.

CS CART user creation via custom code – Multi Vendor Version


Hi there,

Today we will take a look about the user creation via code.

create a php file what ever you wants from the root of the cs cart folder.


define('AREA', 'C');
define('AREA_NAME', 'customer');
require dirname(__FILE__) . '/prepare.php';
require dirname(__FILE__) . '/init.php';
$user_id = $notify_user = $ship_to_another = '';
$user_data = array( 'email' => 'manisanjai@gmail.com',
'password1' => '123456',
'password2' => '123456',
'birthday' => '14/01/1988',
'b_firstname' => 'Manimaran',
'b_lastname' => 'Kalimuthu',
'b_address' => '25, 2nd street',
'b_address_2' => 'test',
'b_city' => 'test',
'b_country' => 'IN',
'b_state' => 'Tamilnadu',
'b_zipcode' => '620008',
'b_phone' => '12345678',
'user_type' => 'C'
);
$_result = fn_update_user($user_id, $user_data, $auth, $ship_to_another,$notify_user);
print_r($_result); // You can get an array with profile id and user id.
}

Just copy and paste this code to your php file. Then execute the file from the browser. You can get the result as an array with user id and profile id.

That’s All.

I hope it helps some one.

Thanks.