This API allows users to interact with a shopping platform by fetching products, viewing product details, managing a shopping cart, and handling comments.
http://18.220.85.60/api/
Fetch products based on filters like title, operating system, and price range.
GET /GetProduct
Params (optional): title
, operating_system
, price_from
, price_to
Fetch detailed information for a specific product by ID.
GET /GetOneProduct
Params: product_id
(required)
Fetch comments for a specific product.
GET /GetProductComment
Params: product_id
(required)
Submit a comment and rating for a product.
POST /SetComment
Params: product_id
, comment
, score
(all required)
Add a product to the shopping cart.
POST /AddToCart
Params: product_id
, email
, quantity
(all required)
Redirect to the shopping cart page after email validation.
Function: toShoppingCart()
- Product List: Displayed in a grid format.
- Product Details: Shows selected product information.
- Comments: View and submit product comments.
- Shopping Cart: Add items and view the cart.
All errors trigger an alert message to the user.
- jQuery for AJAX requests.
- Bootstrap for UI components.