{"id":597,"date":"2026-04-19T19:16:51","date_gmt":"2026-04-19T19:16:51","guid":{"rendered":"https:\/\/demo.webinwp.com\/cod\/?page_id=597"},"modified":"2026-04-19T19:50:01","modified_gmt":"2026-04-19T19:50:01","slug":"cart","status":"publish","type":"page","link":"https:\/\/demo.webinwp.com\/cod\/cart\/","title":{"rendered":"cart"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-page\" data-elementor-id=\"597\" class=\"elementor elementor-597\" data-elementor-post-type=\"page\">\n\t\t\t\t<div class=\"elementor-element elementor-element-dc3abbb e-flex e-con-boxed e-con e-parent\" data-id=\"dc3abbb\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-36bd676 elementor-widget elementor-widget-shortcode\" data-id=\"36bd676\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"shortcode.default\">\n\t\t\t\t\t\t\t<div class=\"elementor-shortcode\"><div id=\"wcod-cart-1\" style=\"font-family:'Inter',sans-serif;max-width:860px;margin:0 auto;\">\n\n    <!-- Empty State (shown until JS evaluates cart) -->\n    <div id=\"wcod-cart-1-empty\" style=\"display:none;text-align:center;padding:60px 20px;\">\n        <svg width=\"64\" height=\"64\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"#d1d5db\" stroke-width=\"1.2\" style=\"margin-bottom:16px;\"><circle cx=\"9\" cy=\"21\" r=\"1\"\/><circle cx=\"20\" cy=\"21\" r=\"1\"\/><path d=\"M1 1h4l2.68 13.39a2 2 0 002 1.61h9.72a2 2 0 002-1.61L23 6H6\"\/><\/svg>\n        <p style=\"font-size:18px;font-weight:700;color:#374151;margin:0 0 8px;\">Your cart is empty<\/p>\n        <p style=\"font-size:14px;color:#9ca3af;margin:0 0 20px;\">Browse our products and add items to get started.<\/p>\n        <a href=\"https:\/\/demo.webinwp.com\/cod\/\"\n           style=\"display:inline-flex;align-items:center;gap:8px;padding:12px 24px;background:#000000;color:#ffffff;border-radius:8px;font-size:14px;font-weight:700;text-decoration:none;\">\n            Continue Shopping        <\/a>\n    <\/div>\n\n    <!-- Cart Content -->\n    <div id=\"wcod-cart-1-content\" style=\"display:none;\">\n\n        <h2 style=\"font-size:22px;font-weight:800;color:#111827;margin:0 0 20px;\">Shopping Cart            <span id=\"wcod-cart-1-count\" style=\"font-size:15px;font-weight:600;color:#9ca3af;margin-left:8px;\"><\/span>\n        <\/h2>\n\n        <div style=\"display:grid;grid-template-columns:1fr 320px;gap:24px;align-items:start;\">\n\n            <!-- Items Table -->\n            <div style=\"background:#fff;border-radius:12px;box-shadow:0 1px 8px rgba(0,0,0,.07);overflow:hidden;\">\n                <div id=\"wcod-cart-1-items\"><\/div>\n            <\/div>\n\n            <!-- Order Summary -->\n            <div style=\"background:#fff;border-radius:12px;box-shadow:0 1px 8px rgba(0,0,0,.07);padding:24px;position:sticky;top:80px;\">\n                <h3 style=\"font-size:15px;font-weight:700;color:#111827;margin:0 0 16px;\">Order Summary<\/h3>\n                <div style=\"display:flex;justify-content:space-between;font-size:14px;color:#6b7280;margin-bottom:10px;\">\n                    <span>Subtotal<\/span>\n                    <span id=\"wcod-cart-1-subtotal\">\u2014<\/span>\n                <\/div>\n                <div style=\"display:flex;justify-content:space-between;font-size:14px;color:#6b7280;margin-bottom:10px;\">\n                    <span>Shipping<\/span>\n                    <span style=\"color:#10b981;font-weight:600;\">Calculated at checkout<\/span>\n                <\/div>\n                <div style=\"border-top:1px solid #f3f4f6;padding-top:12px;margin-top:4px;display:flex;justify-content:space-between;font-size:17px;font-weight:800;color:#111827;\">\n                    <span>Total<\/span>\n                    <span id=\"wcod-cart-1-total\" style=\"color:#000000;\"><\/span>\n                <\/div>\n\n                                <a href=\"https:\/\/demo.webinwp.com\/cod\/checkout\/\"\n                   style=\"display:flex;align-items:center;justify-content:center;gap:8px;margin-top:20px;padding:14px;background:#000000;color:#ffffff;border-radius:8px;font-size:15px;font-weight:700;text-decoration:none;transition:opacity .15s;\"\n                   onmouseover=\"this.style.opacity='.88'\" onmouseout=\"this.style.opacity='1'\">\n                    <svg width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.2\"><path d=\"M5 12h14\"\/><path d=\"M12 5l7 7-7 7\"\/><\/svg>\n                    Proceed to Checkout                <\/a>\n                \n                <a href=\"https:\/\/demo.webinwp.com\/cod\/\"\n                   style=\"display:flex;align-items:center;justify-content:center;gap:6px;margin-top:10px;font-size:13px;color:#000000;text-decoration:none;\">\n                    <svg width=\"13\" height=\"13\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\"><polyline points=\"15 18 9 12 15 6\"\/><\/svg>\n                    Continue Shopping                <\/a>\n            <\/div>\n        <\/div>\n    <\/div>\n<\/div>\n\n<script>\n(function(){\n    var uid      = 'wcod-cart-1';\n    var primary  = '#000000';\n    var radius   = 8;\n    var currency = '$';\n    var curPos   = 'before';\n\n    function fmt(v) { v = parseFloat(v).toFixed(2); return curPos === 'before' ? currency + v : v + currency; }\n    function getCart()   { try { return JSON.parse(localStorage.getItem('wcod_cart') || '[]'); } catch(e){ return []; } }\n    function saveCart(c) { localStorage.setItem('wcod_cart', JSON.stringify(c)); window.dispatchEvent(new Event('wcod_cart_updated')); render(); }\n\n    function render() {\n        var cart    = getCart();\n        var empty   = document.getElementById(uid + '-empty');\n        var content = document.getElementById(uid + '-content');\n        var itemsEl = document.getElementById(uid + '-items');\n        var countEl = document.getElementById(uid + '-count');\n\n        if (!cart.length) {\n            if (empty)   empty.style.display   = 'block';\n            if (content) content.style.display = 'none';\n            return;\n        }\n        if (empty)   empty.style.display   = 'none';\n        if (content) content.style.display = 'block';\n\n        var total = 0;\n        var count = 0;\n        var rows  = '';\n\n        cart.forEach(function(item, idx) {\n            var lineTotal = parseFloat(item.price) * parseInt(item.qty || 1);\n            total += lineTotal;\n            count += parseInt(item.qty || 1);\n\n            var attrsHtml = '';\n            if (item.attrs && Object.keys(item.attrs).length) {\n                Object.keys(item.attrs).forEach(function(k){ attrsHtml += '<span style=\"display:inline-block;background:#f3f4f6;border-radius:4px;padding:1px 6px;font-size:11px;color:#6b7280;margin-right:4px;\">' + escHtml(k.replace('attr_','').replace(\/_\/g,' ')) + ': ' + escHtml(item.attrs[k]) + '<\/span>'; });\n            }\n\n            rows += '<div style=\"display:grid;grid-template-columns:60px 1fr auto auto;gap:12px;align-items:center;padding:14px 16px;border-bottom:1px solid #f3f4f6;\">'\n                  + '<div style=\"width:60px;height:60px;border-radius:' + radius + 'px;overflow:hidden;background:#f3f4f6;flex-shrink:0;\">'\n                  + (item.image ? '<img decoding=\"async\" src=\"' + escHtml(item.image) + '\" style=\"width:100%;height:100%;object-fit:cover;\" \/>' : '<svg width=\"32\" height=\"32\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"#d1d5db\" stroke-width=\"1.2\" style=\"margin:14px\"><rect x=\"3\" y=\"3\" width=\"18\" height=\"18\" rx=\"2\"\/><circle cx=\"8.5\" cy=\"8.5\" r=\"1.5\"\/><polyline points=\"21 15 16 10 5 21\"\/><\/svg>')\n                  + '<\/div>'\n                  + '<div><div style=\"font-size:14px;font-weight:700;color:#111827;margin-bottom:4px;\">' + escHtml(item.title) + '<\/div>' + attrsHtml + '<\/div>'\n                  + '<div style=\"display:flex;align-items:center;border:1px solid #e5e7eb;border-radius:' + radius + 'px;overflow:hidden;\">'\n                  + '<button onclick=\"wcod_cart_adj(' + idx + ',-1)\" style=\"width:32px;height:32px;border:none;background:#f9fafb;cursor:pointer;font-size:16px;font-weight:700;color:#374151;\">&#8722;<\/button>'\n                  + '<span style=\"width:36px;text-align:center;font-size:14px;font-weight:700;\">' + parseInt(item.qty||1) + '<\/span>'\n                  + '<button onclick=\"wcod_cart_adj(' + idx + ',1)\" style=\"width:32px;height:32px;border:none;background:#f9fafb;cursor:pointer;font-size:16px;font-weight:700;color:#374151;\">+<\/button>'\n                  + '<\/div>'\n                  + '<div style=\"text-align:right;\">'\n                  + '<div style=\"font-size:15px;font-weight:800;color:' + primary + ';\">' + fmt(lineTotal) + '<\/div>'\n                  + '<button onclick=\"wcod_cart_remove(' + idx + ')\" style=\"background:none;border:none;color:#ef4444;font-size:12px;cursor:pointer;padding:4px 0;font-weight:600;\">Remove<\/button>'\n                  + '<\/div>'\n                  + '<\/div>';\n        });\n\n        if (itemsEl) itemsEl.innerHTML = rows;\n        if (countEl) countEl.textContent = '(' + count + ' items)';\n        var sub = document.getElementById(uid + '-subtotal');\n        var tot = document.getElementById(uid + '-total');\n        if (sub) sub.textContent = fmt(total);\n        if (tot) tot.textContent = fmt(total);\n    }\n\n    function escHtml(s){ var d=document.createElement('div'); d.appendChild(document.createTextNode(String(s||''))); return d.innerHTML; }\n\n    window.wcod_cart_adj = function(idx, dir) {\n        var cart = getCart();\n        if (!cart[idx]) return;\n        cart[idx].qty = Math.max(1, parseInt(cart[idx].qty || 1) + dir);\n        saveCart(cart);\n    };\n    window.wcod_cart_remove = function(idx) {\n        var cart = getCart();\n        cart.splice(idx, 1);\n        saveCart(cart);\n    };\n\n    render();\n    window.addEventListener('wcod_cart_updated', render);\n})();\n<\/script>\n\n<style>\n@media (max-width: 640px) {\n    #wcod-cart-1-content > div { grid-template-columns: 1fr !important; }\n    #wcod-cart-1-content > div > div:last-child { position: static !important; }\n}\n<\/style>\n<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_kad_post_transparent":"","_kad_post_title":"hide","_kad_post_layout":"fullwidth","_kad_post_sidebar_id":"","_kad_post_content_style":"unboxed","_kad_post_vertical_padding":"hide","_kad_post_feature":"hide","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","footnotes":""},"class_list":["post-597","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/demo.webinwp.com\/cod\/wp-json\/wp\/v2\/pages\/597","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/demo.webinwp.com\/cod\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/demo.webinwp.com\/cod\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/demo.webinwp.com\/cod\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/demo.webinwp.com\/cod\/wp-json\/wp\/v2\/comments?post=597"}],"version-history":[{"count":7,"href":"https:\/\/demo.webinwp.com\/cod\/wp-json\/wp\/v2\/pages\/597\/revisions"}],"predecessor-version":[{"id":610,"href":"https:\/\/demo.webinwp.com\/cod\/wp-json\/wp\/v2\/pages\/597\/revisions\/610"}],"wp:attachment":[{"href":"https:\/\/demo.webinwp.com\/cod\/wp-json\/wp\/v2\/media?parent=597"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}