Overview
After completing a purchase on Mis Compras, your order is recorded in the platform’s database. This guide covers how orders are stored, the order lifecycle, and available tracking mechanisms.Order Storage System
Database Structure
Orders are stored across two main database tables:- pedidos (Orders)
- detalle_pedido (Order Details)
Main order table containing order-level information:Fields:
id_pedido- Unique order identifierid_usuario- Customer user ID (null for guest orders)total- Total order amountfecha- Order creation timestampestado- Order status (pending, completed, etc.)
Order Creation
When you complete checkout, the system creates records in both tables:Order Information
What’s Included in an Order
Each order record contains:Order Header
- Order ID - Unique tracking number
- Customer ID - Your user account ID
- Order Total - Final purchase amount
- Order Date - Timestamp of purchase
- Order Status - Current fulfillment status
Order Line Items
For each product in the order:
- Product ID - Reference to product catalog
- Product Name - Stored at time of purchase
- Quantity - Number of units ordered
- Unit Price - Price per item
- Line Total - Quantity × Unit Price
Example Order Data
Order Confirmation
Immediate Confirmation
After successful checkout, you receive immediate confirmation:Currently, the platform does not send email confirmations. The on-screen confirmation is your primary receipt.
Viewing Your Orders
Current Implementation
Accessing Order Information
Currently, orders can only be viewed by:- Database Access - Direct queries to the
pedidosanddetalle_pedidotables - Admin Panel - If available (not documented in current codebase)
- Customer Support - Contacting platform administrators
Future Order History Feature
A typical order history page would include:Recommended Features
- List of all orders by logged-in user
- Order date and total amount
- Order status (pending, processing, shipped, delivered)
- View order details (items, quantities, prices)
- Download receipts or invoices
- Reorder functionality
- Cancel pending orders
Order Tracking API
Querying Orders
To retrieve orders for a user, you would query:Getting Order Details
To fetch line items for a specific order:Order Status Lifecycle
Status Field
Theestado column in the pedidos table tracks order progress:
Pending
Initial status when order is created
- Order received but not processed
- Awaiting seller confirmation
Status management is not currently implemented in the UI. Status updates would need to be performed manually in the database or through an admin interface.
Order Management for Sellers
Viewing Orders
Sellers can view orders for their products by querying:Fulfillment Workflow
Price Preservation
Historical Pricing
The order system preserves prices at time of purchase:Even if product prices change later, your order records show the price you paid at checkout. This ensures accurate order history and accounting.
Guest Order Tracking
Orders Without Account
If you checked out as a guest (usuario_id = null):
- Order is still created in database
- No way to retrieve order through standard login
- Would need order ID to track
- Consider creating account for future purchases
Building Order History (Implementation Guide)
Creating Order History Page
To implement an order history feature, you would need:- Frontend (HTML)
- JavaScript
- PHP Backend
Order Search and Filtering
Recommended Search Features
Search by Order ID
Allow users to search for specific order by ID number
Filter by Date Range
Show orders within specific date range
Filter by Status
View only pending, completed, or cancelled orders
Search by Product
Find orders containing specific products
Order Notifications
Recommended Notification System
To keep buyers informed, implement:Order Confirmation Email
Send email immediately after successful checkout
- Order number
- Items purchased
- Total amount
- Seller contact info
Status Update Notifications
Alert when order status changes
- Order confirmed by seller
- Order shipped with tracking
- Order delivered
Contact and Support
Getting Order Help
If you need assistance with an order:Contact Seller Directly
Click seller’s name to view their profile and contact information
Platform Support
Contact Mis Compras customer service (if available)
Order Information Needed
- Order date and approximate time
- Products purchased
- Total amount paid
- Your account email
Data Privacy
Order Data Storage
Your order information is stored securely:- Orders linked to your user account
- Payment information not stored (not currently processed)
- Product details preserved for history
- Personal information handled per privacy policy
Review the platform’s privacy policy for details on how order data is used, stored, and shared with sellers.
Troubleshooting
Can't find my order
Can't find my order
- Ensure you’re logged into the correct account
- Check if you completed checkout or just added to cart
- Verify payment was processed (when feature available)
- Contact support with order date and products
Order shows wrong amount
Order shows wrong amount
- Order total reflects prices at time of purchase
- Check for multiple quantities of same product
- Verify all items in order details
- Contact support if discrepancy persists
Order status not updating
Order status not updating
- Status updates may be manual and delayed
- Contact seller directly for status
- Check email for seller communications
- Allow 24-48 hours for status changes
Guest order - can't track
Guest order - can't track
- Guest orders have no tracking capability
- Create account and contact support to link order
- Save order confirmation for reference
- Register account for future purchases
Best Practices
Future Enhancements
Planned Order Tracking Features
Order History Page
Dedicated page showing all past orders
Email Notifications
Automated order confirmation and status emails
Real-time Status Updates
Live order status tracking
Shipping Integration
Direct integration with delivery services
Technical References
Checkout Process
How orders are created
Shopping Cart
Managing items before purchase
Code References
- Order creation:
php/checkout.php:29-52 - Database schema: Order tables structure
- Thank you page:
gracias.html - Seller orders: Would need new
php/obtener_pedidos.php