Product Overview
Products in the system include:- Product name and description
- Images (automatically resized to thumbnails and display sizes)
- Pricing information
- Inventory tracking (quantity available, quantity sold)
- Store location association
- Publication status
- Warranty information
- Keywords for search
Adding a New Product
Access the product creation form atgalleries/add.
Navigate to Add Product
From the admin menu, select Multimedia > Productos > Agregar (or Galeria > Agregar for vendors).
Add Keywords
In the “Palabras Claves” (Keywords) field, enter search terms that customers might use to find this product.
Set Quantity
Enter the initial quantity available in the “Cantidad” field (size 20 input).The system automatically sets:
cantidad_existente: Current available quantityprod_vendidos: Products sold (starts at 0)
Set Alert Threshold
In “Cant. Alerta” (Alert Quantity), specify the minimum quantity before low-stock alerts.
Select Store Location
For Administrators: Use the autocomplete field to search and select a store location by name.For Vendors: The store location is pre-filled and locked to your assigned location.The autocomplete searches stores via
galleries/verlocal and filters by:- Store name matching your search term
- Active stores only (status = 1)
Upload Product Image
Click “Imagen del Producto” to upload an image file.
The system automatically creates two versions:
- Thumbnail: Resized to max 124x124px (saved in
/files/galeria/thumbnails/) - Display: Resized to max 600x480px (saved in
/files/galeria/normal/) - Original: Stored in
/files/galeria/otras/
Set Publication Status
Check the “Publicar” checkbox to make the product visible to customers immediately.Leave unchecked to save as draft.
Add Description
In the “Descripción” field, provide detailed product information. This field supports rich text editing with TinyMCE.
Image Processing Details
When you upload a product image, the system processes it through the SimpleImage library:Thumbnail Generation
Display Image Generation
Viewing Products
Access the product list atgalleries/index.
The product list displays:
- ID: Unique product identifier (
id_galeria) - Nombre de la Galeria: Product name (
texto_galeria) - Fecha de Creación: Creation date (
fechacre_galeria) - Publicar: Publication status (Active/Not Active)
- Nombre de Usuario: User who created the product
- Actions: Edit, Delete, Activate/Deactivate buttons
List Features
Sorting: Click column headers to sort:- Sort by ID:
Paginator->sort('ID', 'id_galeria') - Sort by Name:
Paginator->sort('Nombre de la Galeria', 'texto_galeria') - Sort by Date:
Paginator->sort('Fecha de Creación', 'fechacre_galeria')
Editing Products
Modify existing products throughgalleries/edit/{id}.
Update Product Information
Modify any fields as needed:
- Product name
- Keywords
- Quantity (resets
cantidad_existenteandprod_vendidos) - Alert threshold
- Price
- Store location
- Warranty status
- Image (upload new image to replace)
- Publication status
- Description
Editing quantity resets inventory counters. The system sets
cantidad_existente to the new quantity and prod_vendidos to 0.Managing Publication Status
Control product visibility without deleting.Activating a Product
Make a product visible throughgalleries/activa/{id}:
Deactivating a Product
Hide a product from customers throughgalleries/desactiva/{id}:
Deleting Products
Permanently remove products throughgalleries/delete/{id}.
Inventory Management
Track product quantities and sales automatically.Inventory Fields
- cantidad: Original quantity entered
- cantidad_existente: Current available quantity (decrements with each sale)
- prod_vendidos: Total products sold (increments with each sale)
- cantidad_alerta: Low stock alert threshold
Automatic Inventory Updates
When a sale occurs throughdenuncias/add (the sales function):
Checking Stock Status
View In-Stock Products Navigate to Inventario > Existencia to see products with available quantity. View Out-of-Stock Products Navigate to Inventario > Agotados to see products withcantidad_existente = 0 or below alert threshold.
Store Location Autocomplete
For administrators adding products, the store location field uses AJAX autocomplete:View Suggestions
After typing at least 1 character, the system queries
galleries/verlocal with your search term.The endpoint searches:Troubleshooting
Product Not Saving
Problem: “La galeria no pudo guardarse porfavor intenta nuevamente” Solutions:- Verify all required fields are filled
- Check that image file is a valid format
- Ensure store location is properly selected
- Verify you have permission to add products
- Check file upload size limits
Image Not Displaying
Problem: Product image doesn’t show in listing Solutions:- Verify image file uploaded successfully
- Check file permissions in
/files/galeria/directories - Ensure SimpleImage library is properly loaded
- Verify image dimensions are valid
Stock Not Updating
Problem: Inventory doesn’t change after sales Solutions:- Check that sales are being recorded in the Venta table
- Verify the Gallery update query in the sales controller
- Ensure
cantidad_existentefield is not locked - Check for database transaction errors
Autocomplete Not Working
Problem: Store location autocomplete doesn’t show suggestions Solutions:- Check browser console for JavaScript errors
- Verify jQuery UI is loaded
- Ensure
galleries/verlocalendpoint is accessible - Check that active stores exist in the database (status = 1)
Vendors have their store location automatically assigned and cannot change it when adding products. Only administrators can select different store locations.