• Home
  • Mobile covers
    • Metal cases
      • Iphone
      • Oneplus
      • Samsung
      • Redmi
      • Vivo
      • Oppo
      • Realme
      • Google
      • Poco
      • Moto
      • Iqoo
      • Nothing phone
      • Infinix
      • Tecno
  • Men's wear
    • Hoodies
    • T-shirts
  • Women's wear
    • T-shirt
    • Crop top
    • Dresses
  • Login / Register

Shopping cart

close
  • No products in the cart.
  • Home
  • Mobile Covers
    • Metal cases
      • iPhone
      • OnePlus
      • Samsung
      • Redmi
      • Vivo
      • Oppo
      • Realme
      • Google
      • Poco
      • Moto
      • iQOO
      • Nothing Phone
      • Infinix
      • Tecno
  • Women's Wear
    • T-Shirt
    • Crop Top
    • Dresses
  • Men's Wear
    • Hoodies
    • T-Shirts
theStyleOtheStyleO
  • Login / Register
close
Cart (0) 0 / Rs. 0.00

Cases & Covers

Home » Cases & Covers
  • Apple
  • OnePlus
  • Samsung
  • Oppo
  • Redmi
  • Vivo
  • iQOO
  • Realme
  • Google Pixel
  • Poco
  • Motorola
  • Nothing
  • Infinix
About The Store

THESTYLEO STORE

259, B2 BLOCK Yamuna Vihar New Delhi-110053
Phone: (+91) 9871 652 221
Quick links
  • Search
  • About Us
  • Contact Us
  • Privacy Policy
  • Terms Of Services
  • Returns Policy
2015 Copyright by theStyleO.
Scroll To TopScroll To Top
document.addEventListener("DOMContentLoaded", function () { document.body.addEventListener("click", function (e) { if (e.target.classList.contains("cart-remove-btn")) { e.preventDefault(); const itemKey = e.target.closest("li").getAttribute("data-key"); if (!itemKey) return; // Step 1: Get latest cart to find correct line number by matching key fetch("/cart.js") .then(res => res.json()) .then(cart => { const lineIndex = cart.items.findIndex(i => i.key === itemKey) + 1; if (lineIndex === 0) return; // Step 2: Remove item using real line number return fetch("/cart/change.js", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ line: lineIndex, quantity: 0 }) }); }) .then(() => { // Step 3: Re-render cart drawer fetch(`${routes.cart_url}?section_id=cart-widget-side`) .then(res => res.text()) .then(html => { const parser = new DOMParser(); const doc = parser.parseFromString(html, "text/html"); const newCart = doc.querySelector(".cart-widget-side"); const currentCart = document.querySelector(".cart-widget-side"); if (newCart && currentCart) { currentCart.innerHTML = newCart.innerHTML; } }); }); } }); });