{"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\/order-tool\/","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<p id=\"pattern_options_block\">Fabric color: <select name=\"fabric_color\" id=\"fabric_color\"><option value=\"white\">White<\/option><option value=\"ecru\" selected>Ecru<\/option><\/select> &nbsp; Fabric count: <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><\/p><p id=\"pattern_search_block\">Enter your pattern code: P2P-<input name=\"pat_id\" id=\"pat_id\" type=\"number\" min=\"1\" max=\"9999999999\"> <input type=\"button\" id=\"button_search\" name=\"search\" value=\"Search Color List\" onclick=\"p2pConfigLoadPattern()\"> &nbsp; <input type=\"button\" id=\"button_add\" name=\"load\" value=\"Add to Cart\" onclick=\"p2pConfigLoadCart()\"><\/p><div id=\"dummy_field3\"><\/div><div id=\"dummy_field\"><\/div><div id=\"color_list\"><\/div><script>var p2pCfgAjax=\"https:\/\/webshop.pic2pat.com\/wp-admin\/admin-ajax.php\";var p2pCfgNonce=\"93efb37cb5\";var p2pCfgLang=\"en\";var p2pCfgCart=\"https:\/\/webshop.pic2pat.com\/en\/cart\/\";var p2pCfgTitle = document.title;\n\nfunction p2pConfigLoadPattern() {\n    var patEl    = document.getElementById(\"pat_id\");\n    var colorEl  = document.getElementById(\"fabric_color\");\n    var sizeEl   = document.getElementById(\"fabric_size\");\n    var pat_id   = patEl   ? patEl.value   : 0;\n    var color    = colorEl ? colorEl.value : 0;\n    var size     = sizeEl  ? sizeEl.value  : 0;\n\n    var url = p2pCfgAjax\n        + \"?action=p2p_configurator_colorlist\"\n        + \"&nonce=\"        + encodeURIComponent(p2pCfgNonce)\n        + \"&pat_id=\"       + encodeURIComponent(pat_id)\n        + \"&fabric_color=\" + encodeURIComponent(color)\n        + \"&fabric_size=\"  + encodeURIComponent(size)\n        + \"&lang=\"         + encodeURIComponent(p2pCfgLang);\n\n    var xhr = new XMLHttpRequest();\n    xhr.onreadystatechange = function () {\n        if (xhr.readyState === 4 && xhr.status === 200) {\n            document.getElementById(\"color_list\").innerHTML = xhr.responseText;\n            var listEl   = document.getElementById(\"p2p_color_list\");\n            var totlines = listEl ? listEl.rows.length - 1 : 0;\n            document.getElementById(\"button_add\").disabled = (totlines <= 0);\n        }\n    };\n    xhr.open(\"GET\", url, true);\n    xhr.send(null);\n    return false;\n}\n\nfunction p2pConfigLoadCart() {\n    var listEl   = document.getElementById(\"p2p_color_list\");\n    var totlines = listEl ? listEl.rows.length - 1 : 0;\n    if (totlines <= 0) return;\n\n    document.getElementById(\"button_search\").disabled = true;\n    document.getElementById(\"button_add\").disabled = true;\n    document.getElementById(\"dummy_field3\").textContent = \"Preparing \" + totlines + \" colors...\";\n\n    var items = [];\n    for (var i = 0; i < totlines; i++) {\n        var idEl     = document.getElementById(\"pid\"    + i);\n        var skuEl    = document.getElementById(\"sku\"    + i);\n        var skeinsEl = document.getElementById(\"skeins\" + i);\n        var id     = idEl     ? parseInt(idEl.value, 10)     : 0;\n        var sku    = skuEl    ? skuEl.value                  : \"\";\n        var skeins = skeinsEl ? parseInt(skeinsEl.value, 10) : 0;\n        if (id > 0 && sku !== \"\" && skeins > 0) {\n            items.push({ id: id, sku: sku, skeins: skeins });\n        }\n    }\n\n    if (items.length === 0) {\n        document.getElementById(\"dummy_field3\").textContent = \"Nothing to add.\";\n        return;\n    }\n\n    document.getElementById(\"dummy_field3\").textContent = \"Adding 0 of \" + items.length + \" colors to cart...\";\n\n    var xhr = new XMLHttpRequest();\n    var lastIndex = 0;\n    xhr.onreadystatechange = function () {\n        if (xhr.readyState >= 3) {\n            var chunk = xhr.responseText.substring(lastIndex);\n            lastIndex = xhr.responseText.length;\n            var events = chunk.split(\"\\n\\n\");\n            for (var i = 0; i < events.length; i++) {\n                var block = events[i];\n                if (!block) continue;\n                var eventType = \"message\";\n                var dataLine  = \"\";\n                var lines = block.split(\"\\n\");\n                for (var j = 0; j < lines.length; j++) {\n                    if (lines[j].indexOf(\"event: \") === 0) eventType = lines[j].substring(7);\n                    else if (lines[j].indexOf(\"data: \") === 0) dataLine = lines[j].substring(6);\n                }\n                if (!dataLine) continue;\n                try {\n                    var data = JSON.parse(dataLine);\n                    if (eventType === \"progress\") {\n                        document.getElementById(\"dummy_field3\").textContent =\n                            \"Adding \" + data.current + \" of \" + data.total + \" colors to cart...\";\n                    } else if (eventType === \"done\") {\n                        document.getElementById(\"dummy_field3\").textContent = \"Loading cart...\";\n                        window.location.href = p2pCfgCart;\n                    } else if (eventType === \"error\") {\n                        document.getElementById(\"dummy_field3\").textContent = \"Error: \" + data.error;\n                        document.getElementById(\"button_search\").disabled = false;\n                        document.getElementById(\"button_add\").disabled = false;\n                    }\n                } catch (e) { \/* partial chunk, will arrive next time *\/ }\n            }\n        }\n    };\n    xhr.open(\"POST\", p2pCfgAjax + \"?action=p2p_configurator_additem&nonce=\" + encodeURIComponent(p2pCfgNonce), true);\n    xhr.setRequestHeader(\"Content-Type\", \"application\/json\");\n    xhr.send(JSON.stringify({ items: items }));\n}\n\nvar p2pAddBtn = document.getElementById(\"button_add\");\nif (p2pAddBtn) p2pAddBtn.disabled = true;<\/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.0 - 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\/order-tool\/\" \/>\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\/order-tool\/\" \/>\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\\\/order-tool\\\/\",\"url\":\"https:\\\/\\\/webshop.pic2pat.com\\\/en\\\/order-tool\\\/\",\"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\\\/order-tool\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/webshop.pic2pat.com\\\/en\\\/order-tool\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/webshop.pic2pat.com\\\/en\\\/order-tool\\\/#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\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/webshop.pic2pat.com\\\/en\\\/#organization\"},\"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\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/webshop.pic2pat.com\\\/en\\\/#organization\",\"name\":\"Pic2Pat\",\"url\":\"https:\\\/\\\/webshop.pic2pat.com\\\/en\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/webshop.pic2pat.com\\\/en\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/webshop.pic2pat.com\\\/wp-content\\\/uploads\\\/2021\\\/05\\\/cropped-shop-logo.png\",\"contentUrl\":\"https:\\\/\\\/webshop.pic2pat.com\\\/wp-content\\\/uploads\\\/2021\\\/05\\\/cropped-shop-logo.png\",\"width\":470,\"height\":110,\"caption\":\"Pic2Pat\"},\"image\":{\"@id\":\"https:\\\/\\\/webshop.pic2pat.com\\\/en\\\/#\\\/schema\\\/logo\\\/image\\\/\"}}]}<\/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\/order-tool\/","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\/order-tool\/","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\/order-tool\/","url":"https:\/\/webshop.pic2pat.com\/en\/order-tool\/","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\/order-tool\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/webshop.pic2pat.com\/en\/order-tool\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/webshop.pic2pat.com\/en\/order-tool\/#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":"","publisher":{"@id":"https:\/\/webshop.pic2pat.com\/en\/#organization"},"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"},{"@type":"Organization","@id":"https:\/\/webshop.pic2pat.com\/en\/#organization","name":"Pic2Pat","url":"https:\/\/webshop.pic2pat.com\/en\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webshop.pic2pat.com\/en\/#\/schema\/logo\/image\/","url":"https:\/\/webshop.pic2pat.com\/wp-content\/uploads\/2021\/05\/cropped-shop-logo.png","contentUrl":"https:\/\/webshop.pic2pat.com\/wp-content\/uploads\/2021\/05\/cropped-shop-logo.png","width":470,"height":110,"caption":"Pic2Pat"},"image":{"@id":"https:\/\/webshop.pic2pat.com\/en\/#\/schema\/logo\/image\/"}}]}},"_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}]}}