{"id":1883,"date":"2023-10-16T13:09:10","date_gmt":"2023-10-16T13:09:10","guid":{"rendered":"https:\/\/tests.dnacenter.com\/benin\/cart\/"},"modified":"2023-10-16T13:09:10","modified_gmt":"2023-10-16T13:09:10","slug":"cart","status":"publish","type":"page","link":"https:\/\/tests.dnacenter.com\/benin\/cart\/","title":{"rendered":"Cart"},"content":{"rendered":"\n\n\t\t\t<script type='text\/javascript'>\n\t\t\t\t(() => {\n\t\t\t\t\tinit();\n\t\t\t\t})();\n\n\t\t\t\tlet colors = {\n\t\t\t\t\tred: '#e1251b',\n\t\t\t\t\tblack: '#000000'\n\t\t\t\t}\n\n\t\t\t\tfunction init() {\n\t\t\t\t\tif(verifyDate()) {\n\t\t\t\t\t\tchangeTitle();\n\t\t\t\t\t\theadings = changeHeadings();\n\t\t\t\t\t\tremoveBadCTAs(headings);\n\t\t\t\t\t\tchangeRemainingCTAs();\n\t\t\t\t\t\tsetTimeout(()=>{\n\t\t\t\t\t\t\tmoveRelatedProducts();\n\t\t\t\t\t\t}, 1000);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tfunction verifyDate() {\n\t\t\t\t\tif(document.querySelector('meta[property=\"article:published_time\"]') != null) {\n\t\t\t\t\t\tlet date_published = new Date(document.querySelector('meta[property=\"article:published_time\"]').content);\n\t\t\t\t\t\tlet date_cutoff = new Date('Tue Mar 31 2020 11:38:47 GMT-0400 (Eastern Daylight Time)');\n\n\t\t\t\t\t\tif(date_published != null && date_published.getTime() > date_cutoff.getTime()) {\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\tfunction changeTitle() {\n\t\t\t\t\tdocument.querySelectorAll('.entry-title')[0].style.fontWeight = 500;\n\t\t\t\t}\n\n\t\t\t\tfunction changeHeadings() {\n\t\t\t\t\tlet parent = document.querySelectorAll('.et_pb_post_content_0_tb_body')[0];\n\t\t\t\t\tlet headings = Array.from(parent.querySelectorAll('h2'));\n\t\t\t\t\theadings.map(heading => {\n\t\t\t\t\t\theading.style.color = '#000';\n\t\t\t\t\t\theading.children[0].style.color = '#000';\n\t\t\t\t\t\tif (heading.innerText[0] == '#') { heading.innerText = heading.innerText.substring(1); }\n\t\t\t\t\t});\n\t\t\t\t\treturn headings;\n\t\t\t\t}\n\n\t\t\t\tfunction removeBadCTAs(headings) {\n\t\t\t\t\tlet ctas = headings.map(heading => {\n\t\t\t\t\t\tif (heading.innerHTML.includes('<a')) {\n\t\t\t\t\t\t\treturn heading;\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t\tctas = ctas.filter(x => x !== undefined);\n\t\t\t\t\tfor (let i = 0; i < ctas.length; i++) {\n\t\t\t\t    let el = ctas[i];\n\t\t\t\t  \tel.parentNode.removeChild(el);\n\t\t\t\t  }\n\t\t\t\t  ctas = [];\n\t\t\t\t}\n\n\t\t\t\tfunction changeRemainingCTAs() {\n\t\t\t\t\tlet hr = document.querySelectorAll('hr');\n\t\t\t\t\tlet replace_count = 0;\n\t\t\t\t\tfor (i = 1; i <= hr.length; i++) {\n\t\t\t\t    if (i % 2 == 0) {\n\t\t\t\t    \tlet hr_1 = hr[i-2]\n\t\t\t\t    \tlet h3 = hr_1.nextElementSibling;\n\t\t\t\t    \thr_1.remove();\n\t\t\t\t    \tif(replace_count == 0) {\n\t\t\t\t    \t\t\tlet related_target_div = document.createElement('div');\n\t\t\t\t    \t\t\th3.replaceWith(related_target_div);\n\t\t\t\t    \t\t\trelated_target_div.id = 'shop_related_target';\n\t\t\t\t    \t\t} else {\n\t\t\t\t    \t\t\th3.remove();\n\t\t\t\t    \t\t}\n\t\t\t\t    \thr_2 = hr[i-1].remove();\n\t\t\t\t    \treplace_count++;\n\t\t\t\t    }\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tfunction moveRelatedProducts() {\n\t\t\t\t\tlet target = document.getElementById('shop_related_target');\n\t\t\t\t\tlet related_products = document.getElementsByClassName('et_pb_shop_0_tb_body')[0];\n\t\t\t\t\ttarget.appendChild(related_products);\n\t\t\t\t}\n\t\t\t<\/script>\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":{"_et_pb_use_builder":"","_et_pb_old_content":"","_et_gb_content_width":"","footnotes":""},"class_list":["post-1883","page","type-page","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v26.5 (Yoast SEO v26.5) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Cart - DDC Benin<\/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:\/\/tests.dnacenter.com\/benin\/cart\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Cart\" \/>\n<meta property=\"og:url\" content=\"https:\/\/tests.dnacenter.com\/benin\/cart\/\" \/>\n<meta property=\"og:site_name\" content=\"DDC Benin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/tests.dnacenter.com\/benin\/cart\/\",\"url\":\"https:\/\/tests.dnacenter.com\/benin\/cart\/\",\"name\":\"Cart - DDC Benin\",\"isPartOf\":{\"@id\":\"https:\/\/tests.dnacenter.com\/benin\/#website\"},\"datePublished\":\"2023-10-16T13:09:10+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/tests.dnacenter.com\/benin\/cart\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/tests.dnacenter.com\/benin\/cart\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/tests.dnacenter.com\/benin\/cart\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/tests.dnacenter.com\/benin\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Cart\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/tests.dnacenter.com\/benin\/#website\",\"url\":\"https:\/\/tests.dnacenter.com\/benin\/\",\"name\":\"DDC Benin\",\"description\":\"Just another DDC Sites site\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/tests.dnacenter.com\/benin\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Cart - DDC Benin","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:\/\/tests.dnacenter.com\/benin\/cart\/","og_locale":"en_US","og_type":"article","og_title":"Cart","og_url":"https:\/\/tests.dnacenter.com\/benin\/cart\/","og_site_name":"DDC Benin","twitter_card":"summary_large_image","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/tests.dnacenter.com\/benin\/cart\/","url":"https:\/\/tests.dnacenter.com\/benin\/cart\/","name":"Cart - DDC Benin","isPartOf":{"@id":"https:\/\/tests.dnacenter.com\/benin\/#website"},"datePublished":"2023-10-16T13:09:10+00:00","breadcrumb":{"@id":"https:\/\/tests.dnacenter.com\/benin\/cart\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/tests.dnacenter.com\/benin\/cart\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/tests.dnacenter.com\/benin\/cart\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/tests.dnacenter.com\/benin\/"},{"@type":"ListItem","position":2,"name":"Cart"}]},{"@type":"WebSite","@id":"https:\/\/tests.dnacenter.com\/benin\/#website","url":"https:\/\/tests.dnacenter.com\/benin\/","name":"DDC Benin","description":"Just another DDC Sites site","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/tests.dnacenter.com\/benin\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/tests.dnacenter.com\/benin\/wp-json\/wp\/v2\/pages\/1883","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tests.dnacenter.com\/benin\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/tests.dnacenter.com\/benin\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/tests.dnacenter.com\/benin\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tests.dnacenter.com\/benin\/wp-json\/wp\/v2\/comments?post=1883"}],"version-history":[{"count":0,"href":"https:\/\/tests.dnacenter.com\/benin\/wp-json\/wp\/v2\/pages\/1883\/revisions"}],"wp:attachment":[{"href":"https:\/\/tests.dnacenter.com\/benin\/wp-json\/wp\/v2\/media?parent=1883"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}