{"id":14,"date":"2026-08-27T07:43:52","date_gmt":"2026-08-27T07:43:52","guid":{"rendered":"https:\/\/tankimhock.com\/cart\/"},"modified":"2026-10-05T00:16:34","modified_gmt":"2026-10-04T16:16:34","slug":"cart","status":"publish","type":"page","link":"https:\/\/tankimhock.com\/en\/cart\/","title":{"rendered":"Cart"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-page\" data-elementor-id=\"14\" class=\"elementor elementor-14\" data-elementor-post-type=\"page\">\n\t\t\t\t<div class=\"elementor-element elementor-element-271f569 e-flex e-con-boxed e-con e-parent\" data-id=\"271f569\" 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-b50a5cf elementor-widget elementor-widget-html\" data-id=\"b50a5cf\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t\t<script>\ndocument.addEventListener('click', function (e) {\n\n    const button = e.target.closest(\n        '.quantity .qty-plus, .quantity .qty-minus'\n    );\n\n    if (!button) return;\n\n    e.preventDefault();\n\n    const quantity = button.closest('.quantity');\n    const input = quantity.querySelector('input.qty');\n\n    if (!input) return;\n\n    let value = parseFloat(input.value) || 0;\n    let step = parseFloat(input.getAttribute('step')) || 1;\n    let min = parseFloat(input.getAttribute('min'));\n    let max = parseFloat(input.getAttribute('max'));\n\n    if (isNaN(min)) min = 0;\n    if (isNaN(max)) max = Infinity;\n\n    if (button.classList.contains('qty-plus')) {\n        value = Math.min(value + step, max);\n    }\n\n    if (button.classList.contains('qty-minus')) {\n        value = Math.max(value - step, min);\n    }\n\n    input.value = value;\n\n    \/* Tell WooCommerce quantity changed *\/\n    input.dispatchEvent(\n        new Event('input', { bubbles: true })\n    );\n\n    input.dispatchEvent(\n        new Event('change', { bubbles: true })\n    );\n\n    \/* Enable Update Cart button *\/\n    const updateCart = document.querySelector(\n        'button[name=\"update_cart\"]'\n    );\n\n    if (updateCart) {\n        updateCart.disabled = false;\n        updateCart.removeAttribute('disabled');\n    }\n\n});\n<\/script>\n<script>\n(function () {\n\n    const MIN_POINTS = 1000;\n\n    document.addEventListener('click', function (event) {\n\n        const button = event.target.closest('#wps_cart_points_apply');\n\n        if (!button) {\n            return;\n        }\n\n        \/*\n         * Stop WooCommerce form submission\n         * and stop WP Swings from potentially firing twice.\n         *\/\n        event.preventDefault();\n        event.stopPropagation();\n        event.stopImmediatePropagation();\n\n\n        const wrapper =\n            button.closest('.kc-cart-points') ||\n            button.closest('.wps_wpr_apply_custom_points') ||\n            document;\n\n        const input = wrapper.querySelector('#wps_cart_points');\n\n        if (!input) {\n            console.error('WP Swings points input not found.');\n            return;\n        }\n\n\n        let message = wrapper.querySelector('.kc-points-live-message');\n\n        \/*\n         * Create our own message container if it does not exist.\n         *\/\n        if (!message) {\n\n            message = document.createElement('div');\n            message.className = 'kc-points-live-message';\n\n            wrapper.appendChild(message);\n        }\n\n\n        function showMessage(text, type) {\n\n            message.innerHTML = text;\n            message.style.display = 'block';\n\n            if (type === 'success') {\n                message.style.color = '#18794e';\n            } else {\n                message.style.color = '#D94B1C';\n            }\n        }\n\n\n        const points = parseFloat(input.value || 0);\n\n\n        \/*\n         * Basic validation\n         *\/\n        if (!points || points <= 0) {\n            showMessage(\n                'Please enter the number of points you want to redeem.',\n                'error'\n            );\n            return;\n        }\n\n\n        \/*\n         * Minimum redemption\n         *\/\n        if (points < MIN_POINTS) {\n            showMessage(\n                'Minimum redemption is 1,000 points (RM10 off).',\n                'error'\n            );\n            return;\n        }\n\n\n        \/*\n         * Check WP Swings frontend data exists\n         *\/\n        if (\n            typeof window.wps_wpr === 'undefined' ||\n            typeof window.jQuery === 'undefined'\n        ) {\n\n            showMessage(\n                'Points system could not load. Please refresh the page and try again.',\n                'error'\n            );\n\n            console.error(\n                'WP Swings variable or jQuery is missing.',\n                {\n                    wps_wpr: typeof window.wps_wpr,\n                    jQuery: typeof window.jQuery\n                }\n            );\n\n            return;\n        }\n\n\n        \/*\n         * Check available points\n         *\/\n        const availablePoints =\n            parseFloat(window.wps_wpr.wps_user_current_points || 0);\n\n        if (points > availablePoints) {\n\n            showMessage(\n                'You only have ' + availablePoints + ' points available.',\n                'error'\n            );\n\n            return;\n        }\n\n\n        \/*\n         * Prevent double click\n         *\/\n        const originalText = button.textContent;\n\n        button.disabled = true;\n        button.textContent = 'Applying...';\n\n\n        \/*\n         * Use WP Swings' own AJAX action\n         *\/\n        jQuery.ajax({\n\n            url: window.wps_wpr.ajaxurl,\n\n            type: 'POST',\n\n            dataType: 'json',\n\n            data: {\n                action: 'wps_wpr_apply_fee_on_cart_subtotal',\n                user_id: button.getAttribute('data-id') || '',\n                wps_cart_points: points,\n                wps_nonce: window.wps_wpr.wps_wpr_nonce\n            },\n\n\n            success: function (response) {\n\n                console.log(\n                    'WP Swings Apply Points response:',\n                    response\n                );\n\n\n                if (response && response.result === true) {\n\n                    showMessage(\n                        response.message || 'Points applied successfully.',\n                        'success'\n                    );\n\n\n                    \/*\n                     * Reload so WooCommerce recalculates totals.\n                     *\/\n                    setTimeout(function () {\n\n                        window.location.reload();\n\n                    }, 700);\n\n                } else {\n\n                    showMessage(\n                        response && response.message\n                            ? response.message\n                            : 'Unable to apply points.',\n                        'error'\n                    );\n                }\n            },\n\n\n            error: function (xhr, status, error) {\n\n                console.error(\n                    'WP Swings AJAX error:',\n                    {\n                        status: status,\n                        error: error,\n                        response: xhr.responseText\n                    }\n                );\n\n\n                showMessage(\n                    'Unable to apply points. Please try again.',\n                    'error'\n                );\n            },\n\n\n            complete: function () {\n\n                button.disabled = false;\n                button.textContent = originalText;\n            }\n\n        });\n\n    }, true);\n\n})();\n<\/script>\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":"<p>Remove item Thumbnail image Product Price Quantity Subtotal Here is the Discount Rule for Applying your Points to Cart Total 100 Points = RM1.00 Place an order and earn reward points in return. Conversion rate: RM1 = 1 point. &times; Dried Sour Plum \u9178\u751c\u8bdd\u6885 &#82;&#77;7.80 \u2212 Dried Sour Plum \u9178\u751c\u8bdd\u6885 quantity + &#82;&#77;101.40 &times; Seedless [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-14","page","type-page","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.7 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Cart - TAN KIM HOCK<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/tankimhock.com\/en\/cart\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Cart - TAN KIM HOCK\" \/>\n<meta property=\"og:description\" content=\"Remove item Thumbnail image Product Price Quantity Subtotal Here is the Discount Rule for Applying your Points to Cart Total 100 Points = RM1.00 Place an order and earn reward points in return. Conversion rate: RM1 = 1 point. &times; Dried Sour Plum \u9178\u751c\u8bdd\u6885 &#082;&#077;7.80 \u2212 Dried Sour Plum \u9178\u751c\u8bdd\u6885 quantity + &#082;&#077;101.40 &times; Seedless [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/tankimhock.com\/en\/cart\/\" \/>\n<meta property=\"og:site_name\" content=\"TAN KIM HOCK\" \/>\n<meta property=\"article:modified_time\" content=\"2026-10-04T16:16:34+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/tankimhock.com\/wp-content\/uploads\/2026\/09\/Preserved-Sour-Plum-300x300.png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/tankimhock.com\\\/cart\\\/\",\"url\":\"https:\\\/\\\/tankimhock.com\\\/cart\\\/\",\"name\":\"Cart - TAN KIM HOCK\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/tankimhock.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/tankimhock.com\\\/cart\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/tankimhock.com\\\/cart\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/tankimhock.com\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/Preserved-Sour-Plum-300x300.png\",\"datePublished\":\"2026-08-27T07:43:52+00:00\",\"dateModified\":\"2026-10-04T16:16:34+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/tankimhock.com\\\/cart\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/tankimhock.com\\\/cart\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/tankimhock.com\\\/cart\\\/#primaryimage\",\"url\":\"https:\\\/\\\/tankimhock.com\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/Preserved-Sour-Plum-300x300.png\",\"contentUrl\":\"https:\\\/\\\/tankimhock.com\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/Preserved-Sour-Plum-300x300.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/tankimhock.com\\\/cart\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/tankimhock.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Cart\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/tankimhock.com\\\/#website\",\"url\":\"https:\\\/\\\/tankimhock.com\\\/\",\"name\":\"TAN KIM HOCK\",\"description\":\"The Dodolman of Melaka\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/tankimhock.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Cart - TAN KIM HOCK","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/tankimhock.com\/en\/cart\/","og_locale":"en_US","og_type":"article","og_title":"Cart - TAN KIM HOCK","og_description":"Remove item Thumbnail image Product Price Quantity Subtotal Here is the Discount Rule for Applying your Points to Cart Total 100 Points = RM1.00 Place an order and earn reward points in return. Conversion rate: RM1 = 1 point. &times; Dried Sour Plum \u9178\u751c\u8bdd\u6885 &#82;&#77;7.80 \u2212 Dried Sour Plum \u9178\u751c\u8bdd\u6885 quantity + &#82;&#77;101.40 &times; Seedless [&hellip;]","og_url":"https:\/\/tankimhock.com\/en\/cart\/","og_site_name":"TAN KIM HOCK","article_modified_time":"2026-10-04T16:16:34+00:00","og_image":[{"url":"https:\/\/tankimhock.com\/wp-content\/uploads\/2026\/09\/Preserved-Sour-Plum-300x300.png","type":"","width":"","height":""}],"twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/tankimhock.com\/cart\/","url":"https:\/\/tankimhock.com\/cart\/","name":"Cart - TAN KIM HOCK","isPartOf":{"@id":"https:\/\/tankimhock.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/tankimhock.com\/cart\/#primaryimage"},"image":{"@id":"https:\/\/tankimhock.com\/cart\/#primaryimage"},"thumbnailUrl":"https:\/\/tankimhock.com\/wp-content\/uploads\/2026\/09\/Preserved-Sour-Plum-300x300.png","datePublished":"2026-08-27T07:43:52+00:00","dateModified":"2026-10-04T16:16:34+00:00","breadcrumb":{"@id":"https:\/\/tankimhock.com\/cart\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/tankimhock.com\/cart\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/tankimhock.com\/cart\/#primaryimage","url":"https:\/\/tankimhock.com\/wp-content\/uploads\/2026\/09\/Preserved-Sour-Plum-300x300.png","contentUrl":"https:\/\/tankimhock.com\/wp-content\/uploads\/2026\/09\/Preserved-Sour-Plum-300x300.png"},{"@type":"BreadcrumbList","@id":"https:\/\/tankimhock.com\/cart\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/tankimhock.com\/"},{"@type":"ListItem","position":2,"name":"Cart"}]},{"@type":"WebSite","@id":"https:\/\/tankimhock.com\/#website","url":"https:\/\/tankimhock.com\/","name":"TAN KIM HOCK","description":"The Dodolman of Melaka","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/tankimhock.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/tankimhock.com\/en\/wp-json\/wp\/v2\/pages\/14","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tankimhock.com\/en\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/tankimhock.com\/en\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/tankimhock.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tankimhock.com\/en\/wp-json\/wp\/v2\/comments?post=14"}],"version-history":[{"count":115,"href":"https:\/\/tankimhock.com\/en\/wp-json\/wp\/v2\/pages\/14\/revisions"}],"predecessor-version":[{"id":8638,"href":"https:\/\/tankimhock.com\/en\/wp-json\/wp\/v2\/pages\/14\/revisions\/8638"}],"wp:attachment":[{"href":"https:\/\/tankimhock.com\/en\/wp-json\/wp\/v2\/media?parent=14"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}