Skip to main content
The vendor registration process in Sistema Magdaleno involves verifying store location codes and creating vendor user accounts. This guide covers both the self-registration process for vendors and the approval workflow for administrators.

Vendor Self-Registration

Vendors can register themselves through a public registration form at users/add_vendedor.
1

Access Registration Page

Navigate to the vendor registration page. You’ll see a form with a “Registrar Vendedor” (Register Vendor) header.
2

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.
3

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)
4

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
5

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
6

Registration Confirmation

Upon successful registration, you’re redirected to users/registrado showing a confirmation message.

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

Email

  • 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 through users/add:
1

Navigate to User Management

From the admin menu, go to Registros > Usuarios > Agregar.
2

Select Vendor Group

Choose “Vendedor” from the Perfil dropdown (Group 2).
3

Fill User Details

Enter the vendor’s information:
  • Username
  • Full name
  • Email
  • Password
  • Assign to a store location (locale_id_local)
4

Save Vendor Account

Submit the form. A flash message confirms: “El usuario ha sido registrado” (User has been registered).

Editing Vendor Accounts

Modify existing vendor information through users/edit/{id}:
1

Access User List

Navigate to Registros > Usuarios > Lista to view all users.
2

Select Vendor to Edit

Click the edit icon next to the vendor’s name.
3

Update Information

Modify any user fields as needed. Changes to the group assignment trigger ACL (Access Control List) updates.
4

Save Changes

Submit the form. Confirmation message: “La edición fue hecha con exito” (Edit was successful).

Managing Vendor Permissions

Administrators can set granular permissions through users/permission/{id}:
1

Access Permission Manager

Navigate to the permissions page for a specific user.
2

View Permission Tree

The system displays available controllers and actions organized by parent categories.
3

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 action
  • Acl->deny(): Revoke access to an action
4

Verify Changes

Permission changes take effect immediately. The interface shows visual indicators for allowed/denied permissions.

Deleting Vendor Accounts

Remove vendor accounts through users/delete/{id}:
Deleting a vendor account is permanent and cannot be undone. Ensure you have backed up any necessary data.
1

Locate Vendor

Find the vendor in the user list.
2

Confirm Deletion

Click the delete icon. A JavaScript confirmation prompt asks: “Estas seguro?” (Are you sure?)
3

Complete Deletion

Confirm the action. Success message: “El usuario ha sido eliminado” (User has been deleted).

Vendor Account Workflow

The typical vendor account lifecycle:

Store Code System

Store location codes are generated using:
$cadena = "abcdefghijklmnopqrstuvwxyz";
$cadena = md5($cadena);
srand((double)microtime()*1000000);
$inicio = rand(0,27);
$codigo = substr($cadena,$inicio,6);
This creates a 6-character alphanumeric code that:
  • Is unique per store location
  • Can only be used once for registration
  • Links the vendor account to their physical location
Keep store codes secure and only share them with authorized vendors. Once used, a code cannot register another account.

Password Reset

Vendors can change their password through users/edit_pass/{id}:
1

Access Password Change

Navigate to the password change form.
2

Verify Current Password

Enter your current password for security verification.
3

Set New Password

Enter and confirm your new password (4-10 characters).
4

Save New Password

Submit the form. The system hashes and stores the new password.

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_codigo is working
All vendor accounts are automatically assigned to user group 2 (groups_idgrupos = 2) and have their navigation restricted to vendor-specific functions.

Build docs developers (and LLMs) love