Overview
Once you’ve published products on Mis Compras, you’ll need to manage them over time. The platform provides intuitive tools to view, edit, and delete your listings directly from your seller profile.Viewing Your Products
All your published products are displayed in your seller profile (perfil.html) in a responsive grid layout.
Product Display
Each product card shows:- Product Image: Thumbnail with hover scale effect
- Product Name: Clear, bold title
- Price: Prominently displayed in blue
- Description: Truncated preview (first 100 characters)
- Metadata: Views count and publication date
- Action Buttons: Quick access to view, edit, and delete
Products are loaded dynamically via the
php/mis_productos.php API endpoint, which filters products by your user ID.Product Grid Layout
Editing Products
Access Edit Mode
From your profile, locate the product you want to edit and click the green “Edit” button (pencil icon).This redirects you to:
editar_producto.html?id={product_id}Modify Product Details
The edit form loads with your current product information pre-filled:
- Product name
- Price
- Description
- Current product image (with preview)
Change Product Image (Optional)
Click the “Cambiar imagen” button to upload a new product photo. The preview updates immediately to show your new selection.
Edit Form Interface
The edit page (editar_producto.html) features a modern, dark-themed interface with a split layout:
Left Panel (Form Fields):
- Product name input
- Price input (supports decimals)
- Description textarea (minimum 140px height)
- Current product image preview (280x280px)
- “Cambiar imagen” button for uploading new images
- Live preview when selecting a new file
Technical Implementation
Loading Product Data
Image Preview
Submitting Updates
Deleting Products
Confirm Deletion
A browser confirmation dialog appears: “¿Eliminar este producto?”Click OK to proceed or Cancel to abort.
Delete Implementation
Product Actions Overview
View Product
Opens the public product detail pageLink:
producto.html?id={product_id}Edit Product
Opens the edit form with current dataLink:
editar_producto.html?id={product_id}Delete Product
Permanently removes the productEndpoint:
php/eliminar_producto.phpProduct Statistics
Each product card displays real-time statistics:View Counter
- Icon: Eye icon (
fa-eye) - Data: Number of times the product page has been viewed
- Source:
p.vistasfrom database
Publication Date
- Icon: Calendar icon (
fa-calendar) - Data: Date when the product was first published
- Format: Human-readable date or “Reciente” for new listings
Empty State
When you have no published products, the profile displays an encouraging message:- Large icon (box-open)
- Helpful headline
- Call-to-action message
- Prominent “Publicar nuevo producto” button below
Product Counter
Your profile header displays a dynamic counter showing your total published products:- “0 productos”
- “1 producto”
- “5 productos”
Best Practices for Managing Listings
Regular Updates
Regular Updates
Keep your listings fresh
- Update prices to remain competitive
- Refresh product descriptions with new details
- Replace images with better quality photos
- Adjust inventory availability
Optimize for Search
Optimize for Search
Improve discoverability
- Use descriptive, keyword-rich titles
- Include relevant product specifications
- Select the most accurate category
- Add comprehensive feature lists
Monitor Performance
Monitor Performance
Track your product metrics
- Check view counts regularly
- Identify low-performing products
- Update or remove items with no views
- Replicate successful listing strategies
Maintain Quality
Maintain Quality
Ensure listing accuracy
- Verify all information is current
- Remove sold-out items promptly
- Update product conditions
- Respond to any customer questions
Product Card UI Components
Visual Design
The product cards feature a clean, modern design:- White background with subtle shadow
- 12px border radius for rounded corners
- Smooth hover animation (lifts 4px)
- Enhanced shadow on hover
Action Buttons
Three distinct button styles provide clear visual hierarchy:Responsive Design
The product grid automatically adjusts to screen size:- Desktop: Multiple columns (minimum 300px per card)
- Mobile: Single column layout
- Gap: 20px spacing between cards
Troubleshooting
Products Not Loading
Products Not Loading
Symptoms: Spinner shows indefinitely or error message appearsSolutions:
- Verify you’re logged in (check localStorage.id_usuario)
- Check browser console for API errors
- Ensure
php/mis_productos.phpis accessible - Verify database connection
Edit Button Not Working
Edit Button Not Working
Delete Confirmation Not Appearing
Delete Confirmation Not Appearing
Symptoms: Product deletes without confirmationSolutions:
- Check browser settings for blocked dialogs
- Verify the confirm() function is not being bypassed
- Test in a different browser
Image Preview Not Updating
Image Preview Not Updating
Symptoms: New image doesn’t show in previewSolutions:
- Check file input change event listener
- Verify URL.createObjectURL() is working
- Try a different image file
- Clear browser cache
Next Steps
Optimize Your Profile
Learn about profile features and statistics tracking
Publish More Products
Expand your product catalog with new listings