Accessing Product Details
There are several ways to navigate to a product’s detail page:From the Product Gallery
- Browse the product catalog
- Find the product you’re interested in
- Click the “Ver detalles” link on the product card
- You’ll be taken to the dedicated details page for that product
Direct URL Access
Product details pages use the URL pattern:The product ID is extracted from the URL using React Router’s
useParams() hook and matched against the product catalog.Product Details Display
The product details page shows comprehensive information about the selected item:Page Title
The page header displays:Product Information
When the product is successfully loaded, you’ll see:- Product Name: The full name of the item (displayed as an
<h3>heading) - Product Image: A larger view of the product photo
- Category: The product category (e.g., “Arcos”, “Flechas”, “Accesorios”)
- Description: Detailed description of the product and its features
Display Structure
Product Lookup
The details page retrieves product information from the global product catalog:How It Works
- The product ID is extracted from the URL parameters
- The application searches the loaded product catalog
- It finds the product with matching ID
- Product details are displayed
Products are loaded from the same API source used by the product gallery, ensuring consistent information across the application.
Product Not Found
If you navigate to a product ID that doesn’t exist in the catalog:- The page displays: “producto no encontrado…”
- No product information is shown
- The back button remains available to return to the previous page
- The product has been removed from the catalog
- The URL was typed incorrectly
- The product ID is invalid
Navigation
Returning to Previous Page
At the bottom of the product details page, there’s a “VOLVER” (Back) button:- Click to return to the previous page
- Uses browser history navigation
- Typically returns you to the product gallery
Product Data Fields
Based on the product structure, each item in the catalog contains:| Field | Description | Displayed on Details Page |
|---|---|---|
id | Unique product identifier | In page title |
nombre | Product name | Yes (heading) |
imagen | Product image URL | Yes (large image) |
categoria | Product category | Yes |
descripcion | Detailed description | Yes |
precio | Product price | No (shown in gallery/cart) |
stock | Available quantity | No (shown in gallery) |
Price and stock information are shown in the product gallery and cart, but not on the details page. The details page focuses on descriptive information to help you learn more about the product.
Adding to Cart from Details Page
Currently, the product details page does not include an “Add to Cart” button. To purchase a product:- View the product details
- Click the “VOLVER” button to return to the gallery
- Click “Agregar” on the product card in the gallery
Use Cases
The product details page is ideal for:Reading Descriptions
View the full product description to understand features, specifications, and compatibility.
Viewing Larger Images
See a larger version of the product photo to better examine the item.
Checking Categories
Identify which category the product belongs to for better organization.
Product Research
Learn detailed information before making a purchase decision.
Page Layout
The product details page includes the standard site structure:- Header: Navigation and cart access
- Product Details Section: Main content area with product information
- Back Button: Navigation control
- Footer: Site-wide footer
Best Practices
Access via Gallery
Always access product details through the gallery’s “Ver detalles” link rather than manually typing URLs.
Read Full Description
Take time to read the complete description to understand what you’re purchasing, especially for archery equipment.
Note the Category
Pay attention to the product category to ensure it’s the type of item you’re looking for.
Related Features
- Browsing Products - Return to the gallery to browse more items
- Shopping Cart - Add products to your cart from the gallery
- Contact - Ask questions about specific products