{"id":77645,"date":"2025-11-25T16:32:49","date_gmt":"2025-11-25T08:32:49","guid":{"rendered":"https:\/\/www.mind.org.hk\/cart\/"},"modified":"2025-12-01T20:38:39","modified_gmt":"2025-12-01T12:38:39","slug":"cart","status":"publish","type":"page","link":"https:\/\/www.mind.org.hk\/cart\/","title":{"rendered":"Cart"},"content":{"rendered":"\n\n\n\n<script>\nfunction checkAndRemoveDuplicatedCarts() {\n    const woocommerceCartForm = document.querySelectorAll(\".woocommerce-cart-form\"); \/\/ -> check the selector in your site\n    const cart_totals = document.querySelectorAll(\".cart_totals\");\/\/ ->check the selector too\n\n    if (woocommerceCartForm.length > 1) {\n        for (let index = 1; index < woocommerceCartForm.length; index++) {\n            woocommerceCartForm[index].remove();\n        }\n    }\n\n    if (cart_totals.length > 1) {\n        for (let index = 1; index < cart_totals.length; index++) {\n            cart_totals[index].remove();   \n        }\n    }\n}\n\n\/* UPDATED SECTION *\/\nwindow.onload = addMutationObserver;\nfunction addMutationObserver() {\n  \/\/ add a mutationObserver\n  \/\/https:\/\/developer.mozilla.org\/fr\/docs\/Web\/API\/MutationObserver\n  var targetNodeObserver = document.getElementById(\"main\"); \/\/ use the ID of your cart widget\n  var configObsever = { \n    attributes: true,\n    characterData: true,\n    childList: true,\n    subtree: true,\n    attributeOldValue: true,\n    characterDataOldValue: true \n  };\n\n  \/\/ callback function\n  var callbackObserver = function (mutationsList) {\n    for (var mutation of mutationsList) {\n      if (mutation.type == \"childList\") {\n        console.log(\"node changed.\");\n      } else if (mutation.type == \"attributes\") {\n        console.log(\"attibute '\" + mutation.attributeName + \"'  has changed.\");\n      }\n    }\n    checkAndRemoveDuplicatedCarts(); \/\/ it launch the function here when there is a change\n  };\n\n  \/\/ create instance\n  var observer = new MutationObserver(callbackObserver);\n\n  \/\/ Observe the node\n  observer.observe(targetNodeObserver, configObsever);\n}\n<\/script>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"class_list":["post-77645","page","type-page","status-publish","hentry"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.8.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Cart - MIND HK<\/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:\/\/www.mind.org.hk\/cart\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Cart - MIND HK\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.mind.org.hk\/cart\/\" \/>\n<meta property=\"og:site_name\" content=\"MIND HK\" \/>\n<meta property=\"article:modified_time\" content=\"2025-12-01T12:38:39+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.mind.org.hk\/wp-content\/uploads\/2025\/03\/mindhklogo.jpeg\" \/>\n\t<meta property=\"og:image:width\" content=\"500\" \/>\n\t<meta property=\"og:image:height\" content=\"500\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\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:\/\/www.mind.org.hk\/cart\/\",\"url\":\"https:\/\/www.mind.org.hk\/cart\/\",\"name\":\"Cart - MIND HK\",\"isPartOf\":{\"@id\":\"https:\/\/mind.org.hk\/#website\"},\"datePublished\":\"2025-11-25T08:32:49+00:00\",\"dateModified\":\"2025-12-01T12:38:39+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.mind.org.hk\/cart\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.mind.org.hk\/cart\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.mind.org.hk\/cart\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.mind.org.hk\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Cart\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/mind.org.hk\/#website\",\"url\":\"https:\/\/mind.org.hk\/\",\"name\":\"MIND HK\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/mind.org.hk\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/mind.org.hk\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/mind.org.hk\/#organization\",\"name\":\"MIND HK\",\"url\":\"https:\/\/mind.org.hk\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/mind.org.hk\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.mind.org.hk\/wp-content\/uploads\/2024\/09\/logo_white.png.png\",\"contentUrl\":\"https:\/\/www.mind.org.hk\/wp-content\/uploads\/2024\/09\/logo_white.png.png\",\"width\":809,\"height\":262,\"caption\":\"MIND HK\"},\"image\":{\"@id\":\"https:\/\/mind.org.hk\/#\/schema\/logo\/image\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Cart - MIND HK","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:\/\/www.mind.org.hk\/cart\/","og_locale":"en_US","og_type":"article","og_title":"Cart - MIND HK","og_url":"https:\/\/www.mind.org.hk\/cart\/","og_site_name":"MIND HK","article_modified_time":"2025-12-01T12:38:39+00:00","og_image":[{"width":500,"height":500,"url":"https:\/\/www.mind.org.hk\/wp-content\/uploads\/2025\/03\/mindhklogo.jpeg","type":"image\/jpeg"}],"twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.mind.org.hk\/cart\/","url":"https:\/\/www.mind.org.hk\/cart\/","name":"Cart - MIND HK","isPartOf":{"@id":"https:\/\/mind.org.hk\/#website"},"datePublished":"2025-11-25T08:32:49+00:00","dateModified":"2025-12-01T12:38:39+00:00","breadcrumb":{"@id":"https:\/\/www.mind.org.hk\/cart\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.mind.org.hk\/cart\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.mind.org.hk\/cart\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.mind.org.hk\/"},{"@type":"ListItem","position":2,"name":"Cart"}]},{"@type":"WebSite","@id":"https:\/\/mind.org.hk\/#website","url":"https:\/\/mind.org.hk\/","name":"MIND HK","description":"","publisher":{"@id":"https:\/\/mind.org.hk\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/mind.org.hk\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/mind.org.hk\/#organization","name":"MIND HK","url":"https:\/\/mind.org.hk\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/mind.org.hk\/#\/schema\/logo\/image\/","url":"https:\/\/www.mind.org.hk\/wp-content\/uploads\/2024\/09\/logo_white.png.png","contentUrl":"https:\/\/www.mind.org.hk\/wp-content\/uploads\/2024\/09\/logo_white.png.png","width":809,"height":262,"caption":"MIND HK"},"image":{"@id":"https:\/\/mind.org.hk\/#\/schema\/logo\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/www.mind.org.hk\/wp-json\/wp\/v2\/pages\/77645","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.mind.org.hk\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.mind.org.hk\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.mind.org.hk\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mind.org.hk\/wp-json\/wp\/v2\/comments?post=77645"}],"version-history":[{"count":4,"href":"https:\/\/www.mind.org.hk\/wp-json\/wp\/v2\/pages\/77645\/revisions"}],"predecessor-version":[{"id":78104,"href":"https:\/\/www.mind.org.hk\/wp-json\/wp\/v2\/pages\/77645\/revisions\/78104"}],"wp:attachment":[{"href":"https:\/\/www.mind.org.hk\/wp-json\/wp\/v2\/media?parent=77645"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}