
trendlink
<!DOCTYPE html>
TrendLink.in - Fashion For Every Generation
Discover Fashion For Every Generation
Shop By Categories
Men's Clothing
Women's Clothing
Teenage Fashion
Footwear
Old Men's Clothing
Old Women's Clothing
Hair & Haircare
🔥 Trending Products
Graphic Tee
Stylish Sneakers
Teen Jacket
Trendy Hair Clips
<!DOCTYPE html>
TrendLink - Shop Fashion & Style
<!DOCTYPE html>
E-Commerce Store
<!DOCTYPE html>
Cart - My Online Store
Your Cart
No items in cart.
<!DOCTYPE html>
Product Details
Product Name
Price: ₹999
Description: Lorem ipsum dolor sit amet, consectetur adipiscing elit.
<!DOCTYPE html>
Login - My Store
Login
<!DOCTYPE html>
Register - My Store
Register
<!DOCTYPE html>
Checkout - My Store
Billing Information
<!DOCTYPE html>
Admin Panel - My Store
All Products
| Name |
Price (₹) |
Description |
Actions |
const products = [
{ id: 1, name: "T-Shirt", price: 499, category: "clothing" },
{ id: 2, name: "Sneakers", price: 1999, category: "shoes" },
{ id: 3, name: "Jeans", price: 1299, category: "clothing" },
{ id: 4, name: "Cap", price: 299, category: "accessories" },
];
let cart = [];
function renderProducts(filtered = products) {
const container = document.getElementById("product-list");
container.innerHTML = "";
filtered.forEach(product => {
container.innerHTML += `
${product.name}
₹${product.price}
Category: ${product.category}
`;
});
}
function addToCart(productId) {
cart.push(productId);
document.getElementById("cart-count").innerText = cart.length;
}
document.getElementById("search-input").addEventListener("input", () => {
filterAndSearch();
});
document.getElementById("category-filter").addEventListener("change", () => {
filterAndSearch();
});
function filterAndSearch() {
const searchText = document.getElementById("search-input").value.toLowerCase();
const category = document.getElementById("category-filter").value;
const filtered = products.filter(product => {
const matchesSearch = product.name.toLowerCase().includes(searchText);
const matchesCategory = category === "all" || product.category === category;
return matchesSearch && matchesCategory;
});
renderProducts(filtered);
}
renderProducts();
My Online Store
<!DOCTYPE html>
TrendLink - Add Product
Add Product to TrendLink