Vendor Self-Registration
Vendors can register themselves through a public registration form atusers/add_vendedor.
Access Registration Page
Navigate to the vendor registration page. You’ll see a form with a “Registrar Vendedor” (Register Vendor) header.
Enter Store Code
In the “Ingrese Codigo” (Enter Code) field, type the unique store location code provided by the administrator.Click the search button (consultar.png icon) to verify the code.
Code Verification
The system validates the code through
users/consulta_codigo/{code}:- Valid Code: The registration form appears
- Invalid Code: Error message displays: “No se encontró Código en la Base de Datos ó Código ya registrado” (Code not found or already registered)
Complete Registration Form
Fill out all required fields:
- Perfil (Profile): Automatically set to “Vendedor” (Vendor)
- Nombre de Usuario (Username): Choose a unique username (max 30 characters)
- Nombre y Apellido (Full Name): Enter your full name (max 255 characters)
- Correo (Email): Valid email address
- Password: Choose a secure password (4-10 characters)
- Confirmar Password: Re-enter password for confirmation
Submit Registration
Click “Crear Usuario” (Create User) to submit the registration.The system:
- Assigns the user to Group 2 (Vendor group)
- Hashes the password using Security::hash()
- Associates the user with the verified store location
- Updates the store location record with the verification code
Form Validation
The registration form includes client-side validation:Username Field
- Required field
- Maximum 30 characters
Full Name (perfil_usuario)
- Required field
- Maximum 255 characters
- Required field
- Must be valid email format
- Validation message: “ingresa un correo valido”
Password
- Required field
- Minimum 4 characters
- Maximum 10 characters
- Custom validation messages in Spanish
Confirm Password
- Must match the password field
- Same length requirements as password
- Error message: “Ingresa la misma clave” (Enter the same password)
Administrator Vendor Management
Administrators have additional capabilities for managing vendor accounts.Creating Vendors Manually
Administrators can create vendor accounts throughusers/add:
Fill User Details
Enter the vendor’s information:
- Username
- Full name
- Password
- Assign to a store location (locale_id_local)
Editing Vendor Accounts
Modify existing vendor information throughusers/edit/{id}:
Update Information
Modify any user fields as needed. Changes to the group assignment trigger ACL (Access Control List) updates.
Managing Vendor Permissions
Administrators can set granular permissions throughusers/permission/{id}:
View Permission Tree
The system displays available controllers and actions organized by parent categories.
Toggle Permissions
Click on actions to allow or deny access. Changes are made via AJAX calls to
users/ajax_load.The system uses CakePHP’s ACL component to manage permissions:Acl->allow(): Grant access to an actionAcl->deny(): Revoke access to an action
Deleting Vendor Accounts
Remove vendor accounts throughusers/delete/{id}:
Confirm Deletion
Click the delete icon. A JavaScript confirmation prompt asks: “Estas seguro?” (Are you sure?)
Vendor Account Workflow
The typical vendor account lifecycle:Store Code System
Store location codes are generated using:- Is unique per store location
- Can only be used once for registration
- Links the vendor account to their physical location
Password Reset
Vendors can change their password throughusers/edit_pass/{id}:
Troubleshooting
Code Not Found
Problem: “No se encontró Código en la Base de Datos” Solutions:- Verify the code with your administrator
- Check for typos in the code entry
- Ensure the store location has been created in the system
Code Already Used
Problem: “Código ya registrado” Solutions:- Contact the administrator for a new code
- Check if you already have an account
- Verify the store location hasn’t been assigned to another vendor
Registration Form Not Appearing
Problem: Form doesn’t show after code entry Solutions:- Check browser console for JavaScript errors
- Ensure jQuery is loading correctly
- Verify AJAX request to
users/consulta_codigois working
All vendor accounts are automatically assigned to user group 2 (groups_idgrupos = 2) and have their navigation restricted to vendor-specific functions.