{"id":15737,"date":"2021-04-28T17:48:00","date_gmt":"2021-04-28T16:48:00","guid":{"rendered":"https:\/\/webshop.pic2pat.com\/?page_id=15737"},"modified":"2021-05-04T13:48:46","modified_gmt":"2021-05-04T12:48:46","slug":"order-tool","status":"publish","type":"page","link":"https:\/\/webshop.pic2pat.com\/en\/","title":{"rendered":"Order Tool"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Embroidery floss for patterns generated by the Pic2Pat cross stitch pattern generator can be easily ordered through our order tool. Just enter the pattern number to retrieve the color list.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">All the colors can then be added to the cart at once.<\/p>\n\n\n<div id=\"pattern_search_block\"><label for=\"pat_id\">Pattern code: P2P-<\/label><input name=\"pat_id\" id=\"pat_id\" type=\"text\" inputmode=\"numeric\" pattern=\"[0-9]*\" maxlength=\"10\" autocomplete=\"off\" oninput=\"this.value=this.value.replace(\/\\D\/g,'')\"> <label for=\"fabric_size\">Fabric count:<\/label><select name=\"fabric_size\" id=\"fabric_size\"><option value=\"6\">6 count<\/option><option value=\"11\">11 count<\/option><option value=\"14\" selected>14 count<\/option><option value=\"16\">16 count<\/option><option value=\"18\">18 count<\/option><\/select><label for=\"fabric_color\">Fabric color:<\/label><select name=\"fabric_color\" id=\"fabric_color\" onchange=\"p2pConfigColorChanged()\"><option value=\"white\">White<\/option><option value=\"ecru\" selected>Ecru<\/option><\/select><\/div><style>#pattern_cart_block{display:flex;gap:10px;flex-wrap:wrap}#pattern_cart_block input{flex:1 1 0;min-width:0}@media (min-width:600px){#pattern_cart_block input{flex:0 0 auto}}#pattern_search_block{display:grid;grid-template-columns:max-content minmax(0,16em);gap:10px 12px;align-items:center;margin:0 0 1.5em}#pattern_search_block label{margin:0;text-align:right;white-space:nowrap}#pattern_search_block input,#pattern_search_block select{width:100%;height:2.6em;box-sizing:border-box;margin:0;padding:0 0.6em;font-size:1em;line-height:normal;color:inherit;background:#fff;border:1px solid #ccc;border-radius:0;box-shadow:none}@media (max-width:480px){#pattern_search_block{grid-template-columns:minmax(0,1fr);gap:4px}#pattern_search_block label{text-align:left;white-space:normal;margin-top:8px}}#p2p_cfg_message:empty{display:none}#p2p_waiting{position:fixed;top:0;right:0;bottom:0;left:0;z-index:100000;box-sizing:border-box;padding:24px;background:#f8f4ef;display:flex;align-items:center;justify-content:center}#p2p_waiting[hidden]{display:none}#p2p_waiting .p2p-wait-card{width:100%;max-width:420px;text-align:center;color:#2e343c}#p2p_waiting .p2p-wait-image{display:block;box-sizing:content-box;width:auto;height:auto;max-width:min(260px,60vw);max-height:34vh;margin:0 auto 28px;background:#fff;border:8px solid #fff;box-shadow:0 6px 24px rgba(46,52,60,0.16)}#p2p_waiting .p2p-wait-title{margin:0 0 22px;font-size:1.5rem;line-height:1.25;font-weight:600}#p2p_waiting .p2p-wait-step{display:inline-flex;align-items:center;gap:12px;padding:7px 0;text-align:left}#p2p_waiting .p2p-wait-step::before{content:\"\";flex:0 0 auto;box-sizing:border-box;width:22px;height:22px;border-radius:50%;border:2px solid #ead3db;border-top-color:#DA1C5C;animation:p2pWaitTurn 0.9s linear infinite}@keyframes p2pWaitTurn{to{transform:rotate(360deg)}}<\/style><p id=\"pattern_cart_block\"><input type=\"button\" id=\"button_kit\" name=\"kit\" value=\"Order Kit\" onclick=\"p2pConfigOrderKit()\"><\/p><p id=\"p2p_cfg_message\" role=\"alert\"><\/p><div id=\"p2p_waiting\" role=\"status\" hidden><div class=\"p2p-wait-card\"><img decoding=\"async\" class=\"p2p-wait-image\" src=\"https:\/\/www.pic2pat.com\/assets\/landing\/landing_inspiration_santorini.webp\" alt=\"\"><div class=\"p2p-wait-title\">Preparing your kit\u2026<\/div><div class=\"p2p-wait-step\">Putting your kit in the cart<\/div><\/div><\/div><script>var p2pCfgAjax=\"https:\/\/webshop.pic2pat.com\/wp-admin\/admin-ajax.php\";var p2pCfgNonce=\"8ac1243276\";var p2pCfgLang=\"en\";var p2pCfgCart=\"https:\/\/webshop.pic2pat.com\/en\/cart\/\";var p2pCfgAvail={\"white\":{\"6\":false,\"11\":false,\"14\":true,\"16\":false,\"18\":true},\"ecru\":{\"6\":false,\"11\":false,\"14\":true,\"16\":false,\"18\":true}};var p2pCfgCount=0;var p2pCfgFailed=\"Your kit could not be made. Please reload the page and try again.\";var p2pArrival   = false;   \/\/ arrived with ?p2p= from the generator or the QR code: the pattern code is fixed\nvar p2pFixedSize = false;   \/\/ the pattern of the arrival has its own fabric count: the count is fixed too\n\n\/* Everything locked while her kit is made; afterwards she gets back what her path allows. *\/\nfunction p2pSetBusy(busy) {\n    var ids = [\"pat_id\", \"fabric_size\", \"fabric_color\", \"button_kit\"];\n    for (var i = 0; i < ids.length; i++) {\n        var el = document.getElementById(ids[i]);\n        if (!el) continue;\n        el.disabled = busy\n            || (ids[i] === \"pat_id\" && p2pArrival)\n            || (ids[i] === \"fabric_size\" && p2pFixedSize);\n    }\n}\n\n\/* The waiting screen over the whole page, on or off. *\/\nfunction p2pShowWaiting(on) {\n    var el = document.getElementById(\"p2p_waiting\");\n    if (el) el.hidden = !on;\n}\n\nfunction p2pConfigMessage(text) {\n    var el = document.getElementById(\"p2p_cfg_message\");\n    if (el) el.textContent = text;\n}\n\n\/* Another colour: the counts sold in that colour, unless her count is fixed. *\/\nfunction p2pConfigColorChanged() {\n    if (!p2pFixedSize) p2pConfigFilterSizes();\n}\n\nfunction p2pConfigFilterSizes() {\n    var colorEl = document.getElementById(\"fabric_color\");\n    var sizeEl  = document.getElementById(\"fabric_size\");\n    if (!colorEl || !sizeEl) return;\n\n    var map = p2pCfgAvail[colorEl.value] || {};\n    var current = sizeEl.value;\n    var currentOk = false;\n\n    for (var i = 0; i < sizeEl.options.length; i++) {\n        var opt = sizeEl.options[i];\n        var ok = map[opt.value] !== false;\n        opt.disabled = !ok;\n        opt.hidden   = !ok;\n        if (ok && opt.value === current) currentOk = true;\n    }\n\n    if (!currentOk) {\n        if (map[\"14\"] !== false) {\n            sizeEl.value = \"14\";\n        } else {\n            for (var j = 0; j < sizeEl.options.length; j++) {\n                if (!sizeEl.options[j].disabled) { sizeEl.value = sizeEl.options[j].value; break; }\n            }\n        }\n    }\n}\n\n\/* \"Order Kit\": the shop makes her kit from the pattern code, the count and the colour, and\n   puts it in her cart. The waiting screen covers the page until the shop has answered; then\n   her browser goes to the cart, and the waiting screen stays in view until the cart arrives.\n   When no kit was made the Order Tool comes back with the reason. *\/\nfunction p2pConfigOrderKit() {\n    var patEl   = document.getElementById(\"pat_id\");\n    var colorEl = document.getElementById(\"fabric_color\");\n    var sizeEl  = document.getElementById(\"fabric_size\");\n    var pat     = patEl ? patEl.value.replace(\/\\D\/g, \"\") : \"\";\n    if (pat === \"\") { if (patEl) patEl.focus(); return; }\n\n    var size = p2pFixedSize ? p2pCfgCount : (sizeEl ? parseInt(sizeEl.value, 10) || 0 : 0);\n\n    p2pConfigMessage(\"\");\n    p2pSetBusy(true);\n    p2pShowWaiting(true);\n\n    var xhr = new XMLHttpRequest();\n    xhr.onreadystatechange = function () {\n        if (xhr.readyState !== 4) return;\n        var r = null;\n        try { r = JSON.parse(xhr.responseText); } catch (e) { r = null; }\n        if (r && r.success) {\n            window.location.href = p2pCfgCart;\n            return;\n        }\n        var data = (r && r.data) ? r.data : {};\n        if (p2pArrival && (data.code === \"not_found\" || data.code === \"no_materials\")) {\n            \/* the pattern of the arrival cannot be ordered: she may type another code *\/\n            p2pArrival   = false;\n            p2pFixedSize = false;\n            p2pConfigFilterSizes();\n        }\n        p2pShowWaiting(false);\n        p2pSetBusy(false);\n        p2pConfigMessage(data.error || p2pCfgFailed);\n    };\n    xhr.open(\"POST\", p2pCfgAjax\n        + \"?action=p2p_configurator_kit\"\n        + \"&nonce=\" + encodeURIComponent(p2pCfgNonce)\n        + \"&lang=\"  + encodeURIComponent(p2pCfgLang), true);\n    xhr.setRequestHeader(\"Content-Type\", \"application\/json\");\n    xhr.send(JSON.stringify({ pat_id: pat, fabric_color: colorEl ? colorEl.value : \"\", fabric_size: size }));\n}\n\np2pConfigFilterSizes();\n\n\/* Arriving with ?p2p=<code>: the code is fixed, and the count too when her pattern has one. *\/\nvar p2pCode = new URLSearchParams(window.location.search).get(\"p2p\");\nif (p2pCode && \/^\\d+$\/.test(p2pCode)) {\n    var p2pPatEl = document.getElementById(\"pat_id\");\n    if (p2pPatEl) {\n        p2pArrival     = true;\n        p2pPatEl.value = p2pCode;\n        var p2pSizeEl = document.getElementById(\"fabric_size\");\n        if (p2pSizeEl && p2pCfgCount > 0) {\n            p2pSizeEl.value = String(p2pCfgCount);\n            p2pFixedSize    = true;\n        }\n        p2pSetBusy(false);\n    }\n}\n\n\/* Back from the cart: the browser may show this page as it was left, so the Order Tool\n   is made usable again and the waiting screen is taken away. *\/\nwindow.addEventListener(\"pageshow\", function () {\n    p2pShowWaiting(false);\n    p2pSetBusy(false);\n});\n<\/script>\n","protected":false},"excerpt":{"rendered":"<p>Embroidery floss for patterns generated by the Pic2Pat cross stitch pattern generator can be easily ordered through our order tool. Just enter the pattern number to retrieve the color list. All the colors can then be added to the cart at once.<\/p>\n","protected":false},"author":3,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-15737","page","type-page","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.9 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Order Tool - Pic2Pat<\/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:\/\/webshop.pic2pat.com\/en\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Order Tool - Pic2Pat\" \/>\n<meta property=\"og:description\" content=\"Embroidery floss for patterns generated by the Pic2Pat cross stitch pattern generator can be easily ordered through our order tool. Just enter the pattern number to retrieve the color list. All the colors can then be added to the cart at once.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/webshop.pic2pat.com\/en\/\" \/>\n<meta property=\"og:site_name\" content=\"Pic2Pat\" \/>\n<meta property=\"article:modified_time\" content=\"2021-05-04T12:48:46+00:00\" \/>\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:\\\/\\\/webshop.pic2pat.com\\\/en\\\/\",\"url\":\"https:\\\/\\\/webshop.pic2pat.com\\\/en\\\/\",\"name\":\"Order Tool - Pic2Pat\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/webshop.pic2pat.com\\\/en\\\/#website\"},\"datePublished\":\"2021-04-28T16:48:00+00:00\",\"dateModified\":\"2021-05-04T12:48:46+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/webshop.pic2pat.com\\\/en\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/webshop.pic2pat.com\\\/en\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/webshop.pic2pat.com\\\/en\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/webshop.pic2pat.com\\\/en\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Order Tool\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/webshop.pic2pat.com\\\/en\\\/#website\",\"url\":\"https:\\\/\\\/webshop.pic2pat.com\\\/en\\\/\",\"name\":\"Pic2Pat\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/webshop.pic2pat.com\\\/en\\\/?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":"Order Tool - Pic2Pat","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:\/\/webshop.pic2pat.com\/en\/","og_locale":"en_US","og_type":"article","og_title":"Order Tool - Pic2Pat","og_description":"Embroidery floss for patterns generated by the Pic2Pat cross stitch pattern generator can be easily ordered through our order tool. Just enter the pattern number to retrieve the color list. All the colors can then be added to the cart at once.","og_url":"https:\/\/webshop.pic2pat.com\/en\/","og_site_name":"Pic2Pat","article_modified_time":"2021-05-04T12:48:46+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/webshop.pic2pat.com\/en\/","url":"https:\/\/webshop.pic2pat.com\/en\/","name":"Order Tool - Pic2Pat","isPartOf":{"@id":"https:\/\/webshop.pic2pat.com\/en\/#website"},"datePublished":"2021-04-28T16:48:00+00:00","dateModified":"2021-05-04T12:48:46+00:00","breadcrumb":{"@id":"https:\/\/webshop.pic2pat.com\/en\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/webshop.pic2pat.com\/en\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/webshop.pic2pat.com\/en\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/webshop.pic2pat.com\/en\/"},{"@type":"ListItem","position":2,"name":"Order Tool"}]},{"@type":"WebSite","@id":"https:\/\/webshop.pic2pat.com\/en\/#website","url":"https:\/\/webshop.pic2pat.com\/en\/","name":"Pic2Pat","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/webshop.pic2pat.com\/en\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/webshop.pic2pat.com\/en\/wp-json\/wp\/v2\/pages\/15737","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webshop.pic2pat.com\/en\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/webshop.pic2pat.com\/en\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/webshop.pic2pat.com\/en\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/webshop.pic2pat.com\/en\/wp-json\/wp\/v2\/comments?post=15737"}],"version-history":[{"count":0,"href":"https:\/\/webshop.pic2pat.com\/en\/wp-json\/wp\/v2\/pages\/15737\/revisions"}],"wp:attachment":[{"href":"https:\/\/webshop.pic2pat.com\/en\/wp-json\/wp\/v2\/media?parent=15737"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}