Overview
The product management system allows you to maintain your clothing inventory with detailed attributes including name, price, stock levels, category, size, and color. All product operations are accessible from the main inventory page.Viewing the Inventory
Accessing the Product List
Navigate to the main inventory page (index.php) to view all products in a sortable, searchable table.
Available columns:
- ID - Unique product identifier
- Nombre - Product name
- Precio - Current price in dollars
- Stock - Current stock quantity
- Categoría - Product category
- Talla - Size (displayed in uppercase)
- Color - Color name
- Acciones - Edit and delete buttons
Sorting Products
Click any column header
Toggle sort direction
Searching Products
The search functionality allows you to quickly find products across multiple fields.Enter search term
- Product name
- Color
- Size
- Price
- Product ID (exact match)
View filtered results
Creating a New Product
Click 'Nueva Prenda'
crear.php).Fill in product details
- Enter the product name (e.g., “Camisa Oxford”)
- This is a text field with no character limit
- Enter the price as a decimal number (e.g., 500.00)
- Accepts up to 2 decimal places
- Field type:
numberwithstep="0.01"
- Enter the initial stock quantity (default: 0)
- Must be a whole number
- You can update this later through stock operations
Select product attributes
- Select from existing categories (e.g., Camisas, Pantalones, Accesorios)
- Categories are managed in the Categories section
- Select from available sizes (displayed in uppercase)
- Common values: S, M, L, XL
- Sizes are managed in the catalog settings
- Select from available colors
- Colors are managed in the catalog settings
Save the product
Database Operation
Editing an Existing Product
Locate the product
Click 'Editar'
editar.php?id=X).Review current values
- Product name
- Current price
- Current stock level
- Selected category, size, and color
Modify fields
- Edit the product name
- Update the price
- Adjust stock quantity directly
- Note: For audited stock changes, use Stock Operations instead
- Change any attribute using the dropdown menus
Select the employee making changes
Price Change Tracking
When you update a product’s price:- The system compares the new price with the previous price
- If different, it automatically inserts a record into the
actualizaciontable - The record includes:
- Previous price
- New price
- Product ID
- Employee ID (who made the change)
- Timestamp
Transaction Safety
The edit operation uses database transactions for data integrity:Deleting a Product
Confirm deletion
- Click OK to proceed with deletion
- Click Cancel to abort
Handle deletion result
registro or actualizacion tables), deletion will fail with an alert:“No se puede eliminar: Esta prenda tiene registros asociados en otras tablas.”
Why Deletion Might Fail
Products cannot be deleted if they have:- Price change history (
actualizaciontable) - Merchandise reception records (
registrotable) - Stock movement records (
movimiento_stocktable)
Troubleshooting
Search returns no results
Search returns no results
- Verify your search term spelling
- Try searching with fewer characters (partial matches work)
- Click Limpiar to reset and view all products
- Check that products exist in the database
Cannot save product - form validation error
Cannot save product - form validation error
- Ensure all required fields are filled
- Check that price is a valid decimal number (e.g., 500.00, not “500-”)
- Verify stock is a whole number (no decimals)
- Make sure you’ve selected options from all dropdown menus
Cannot edit product - missing employee selection
Cannot edit product - missing employee selection
- Scroll down to find the “Empleado que realiza la modificación” field (red border)
- Select your name from the dropdown
- If your name isn’t listed, contact an administrator to add you in Employee Management
Cannot delete product - has associated records
Cannot delete product - has associated records
- Products with price history cannot be deleted
- Products with stock movement records cannot be deleted
- Products with reception records cannot be deleted
Price changes not being tracked
Price changes not being tracked
- The new price is different from the current price
- You selected an employee in the dropdown
- The transaction completed successfully
Dropdowns are empty (no categories, sizes, or colors)
Dropdowns are empty (no categories, sizes, or colors)
- These catalog items must be created first
- Go to Categorías to add categories
- Go to Colores to add colors
- Go to Tallas to add sizes
- Return to product creation after setting up catalogs
Related Features
Managing Categories
Stock Operations
Managing Employees
Database Schema
Best Practices
Use descriptive product names
Set up catalogs first
Use stock operations for inventory changes
Always select the correct employee