Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

How To Check If The Company Field On The Frontend Already Exists Rate Topic   - - - - -

 
  • Dexterflamez
  • Senior Member
  • Trial users
  • Join Date: 08-Jan 18
  • 168 posts

Posted 05 August 2020 - 03:33 PM #1

I'm trying to check if company on the frontend already exist then show error message, it checks the email but i want it to also check if a company name on the front end already exists, this is what i have tried, any help is appreciated.

 

//check if the entered company name already exists in the database

 

if (!isset($user_data['company'])) {
           $user_data['company'] = db_get_field("SELECT email FROM ?:users WHERE user_id = ?i", $user_id);
        }
        
        $is_exist = fn_is_user_exists($user_id, $user_data);
 
//show error message if true
 
        if ($is_exist) {
            fn_set_notification('E', __('error'), __('error_user_exists'), '', 'user_exist');
 
            return false;
        }


 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 20936 posts

Posted 06 August 2020 - 05:10 AM #2

Do you mean vendor registration page?


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    Multi-Vendor PLUS           USD 3100 (2775)
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      Multi-Vendor Ultimate       USD 7500 (6000)

 
  • Dexterflamez
  • Senior Member
  • Trial users
  • Join Date: 08-Jan 18
  • 168 posts

Posted 07 August 2020 - 11:20 PM #3

Do you mean vendor registration page?

 

The user side of the company but i got it figured out, thanks