{"id":30942,"date":"2026-10-29T21:39:44","date_gmt":"2026-10-29T20:39:44","guid":{"rendered":"https:\/\/webshop.pic2pat.com\/ferramenta-de-encomenda\/"},"modified":"2026-10-29T21:39:44","modified_gmt":"2026-10-29T20:39:44","slug":"ferramenta-de-encomenda","status":"publish","type":"page","link":"https:\/\/webshop.pic2pat.com\/pt-pt\/ferramenta-de-encomenda\/","title":{"rendered":"Ferramenta de Encomenda"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">A linha de bordar para os gr\u00e1ficos criados com o gerador de gr\u00e1ficos de ponto cruz Pic2Pat pode ser encomendada facilmente atrav\u00e9s da nossa ferramenta de encomenda. Basta introduzir o n\u00famero do gr\u00e1fico para obter a lista de cores.<\/p>\n\n<p class=\"wp-block-paragraph\">Depois, todas as cores podem ser adicionadas ao carrinho de uma s\u00f3 vez.<\/p>\n<div id=\"pattern_search_block\"><label for=\"pat_id\">C\u00f3digo do gr\u00e1fico: 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_color\">Cor do tecido:<\/label><select name=\"fabric_color\" id=\"fabric_color\" onchange=\"p2pConfigColorChanged()\"><option value=\"white\">Branco<\/option><option value=\"ecru\" selected>Cru<\/option><\/select><label for=\"fabric_size\">Contagem do tecido:<\/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><\/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-list{width:100%;border-collapse:collapse;margin:1em 0}.p2p-list th,.p2p-list td{padding:9px 12px;border:1px solid #e0e0e0;text-align:left;vertical-align:middle}.p2p-list thead th{background:#f7f6f7;font-weight:600}.p2p-list tbody tr:nth-child(even){background:#fafafa}.p2p-list img{max-width:60px;height:auto}<\/style><p id=\"pattern_button_block\"><input type=\"button\" id=\"button_search\" name=\"search\" value=\"Procurar Lista de Cores\" onclick=\"p2pConfigLoadPattern()\"><\/p><p id=\"pattern_cart_block\"><input type=\"button\" id=\"button_add\" name=\"load\" value=\"Adicionar ao Carrinho\" onclick=\"p2pConfigLoadCart(false)\"><input type=\"button\" id=\"button_replace\" name=\"replace\" value=\"Substituir Carrinho\" onclick=\"p2pConfigLoadCart(true)\"><\/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=\"552c841272\";var p2pCfgLang=\"pt-pt\";var p2pCfgCart=\"https:\/\/webshop.pic2pat.com\/pt-pt\/carrinho\/\";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 p2pCfgCartEmpty=false;var p2pCfgTitle = document.title;\nvar p2pArrival  = false;   \/\/ arrived with ?p2p= from the QR code or the generator\nvar p2pAutoCart = false;   \/\/ arrival with an empty cart: add without asking\n\n\/* Disable everything while adding; afterwards give back what the path allows.\n   On arrival the code, the count and the search button stay locked. *\/\nfunction p2pSetBusy(busy) {\n    var ids = [\"pat_id\", \"fabric_color\", \"fabric_size\", \"button_search\", \"button_add\", \"button_replace\"];\n    for (var i = 0; i < ids.length; i++) {\n        var el = document.getElementById(ids[i]);\n        if (!el) continue;\n        if (busy) { el.disabled = true; continue; }\n        if (p2pArrival && (ids[i] === \"pat_id\" || ids[i] === \"fabric_size\" || ids[i] === \"button_search\")) continue;\n        el.disabled = false;\n    }\n    if (!busy) {\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        document.getElementById(\"button_replace\").disabled = (totlines <= 0);\n    }\n}\n\nfunction p2pConfigColorChanged() {\n    if (p2pArrival) p2pArrivalLoad(); else p2pConfigFilterSizes();\n}\n\n\/* Arrival: her count is fixed; cloth only when that count is sold in the chosen colour. *\/\nfunction p2pArrivalLoad() {\n    var colEl = document.getElementById(\"fabric_color\");\n    var map   = (colEl && p2pCfgAvail[colEl.value]) || {};\n    p2pSetBusy(true);\n    if (p2pCfgCount <= 0) {\n        p2pConfigLoadPattern(false);\n    } else {\n        p2pConfigLoadPattern(map[String(p2pCfgCount)] !== true);\n    }\n}\n\nfunction p2pConfigLoadPattern(noCloth) {\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 && !noCloth) ? sizeEl.value : 0;   \/\/ noCloth: her own count is not sold, threads only\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 dl = document.querySelectorAll(\"#color_list time.p2p-kit-deadline\");\n            for (var k = 0; k < dl.length; k++) {\n                try {\n                    var dd = new Date(parseInt(dl[k].getAttribute(\"data-p2p-deadline\"), 10) * 1000);\n                    dl[k].textContent = dd.toLocaleString(document.documentElement.lang || undefined, {dateStyle: \"medium\", timeStyle: \"short\"});\n                } catch (e) {}\n            }\n            var listEl   = document.getElementById(\"p2p_color_list\");\n            var totlines = listEl ? listEl.rows.length - 1 : 0;\n            if (p2pArrival && totlines <= 0) {\n                \/* unknown code or no shop materials (non-DMC): the normal screen *\/\n                p2pArrival  = false;\n                p2pAutoCart = false;\n                document.getElementById(\"pattern_button_block\").style.display = \"\";\n                document.getElementById(\"color_list\").style.display = \"\";\n            }\n            p2pSetBusy(false);\n            if (p2pAutoCart && totlines > 0) {\n                p2pAutoCart = false;\n                p2pConfigLoadCart(false);\n            }\n        }\n    };\n    xhr.open(\"GET\", url, true);\n    xhr.send(null);\n    return false;\n}\n\nfunction p2pConfigLoadCart(replace) {\n    var listEl   = document.getElementById(\"p2p_color_list\");\n    var totlines = listEl ? listEl.rows.length - 1 : 0;\n    if (totlines <= 0) return;\n\n    p2pSetBusy(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                        p2pSetBusy(false);\n                    }\n                } catch (e) { \/* partial chunk, will arrive next time *\/ }\n            }\n        }\n    };\n    var patIdEl = document.getElementById(\"pat_id\");\n    var patId   = patIdEl ? parseInt(patIdEl.value, 10) : 0;\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, replace: !!replace, pat_id: patId }));\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\nvar p2pAddBtn = document.getElementById(\"button_add\");\nif (p2pAddBtn) p2pAddBtn.disabled = true;\nvar p2pReplaceBtn = document.getElementById(\"button_replace\");\nif (p2pReplaceBtn) p2pReplaceBtn.disabled = true;\np2pConfigFilterSizes();\n\n\/* Arriving with ?p2p=<code> from the QR code or the generator: code and count are\n   locked, search button and colour list hidden. Empty cart: the materials go in\n   by themselves. Otherwise she picks the colour and Add or Replace. *\/\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        p2pAutoCart = p2pCfgCartEmpty;\n        p2pPatEl.value = p2pCode;\n        var p2pSizeEl = document.getElementById(\"fabric_size\");\n        if (p2pSizeEl && p2pCfgCount > 0) p2pSizeEl.value = String(p2pCfgCount);\n        document.getElementById(\"pattern_button_block\").style.display = \"none\";\n        document.getElementById(\"color_list\").style.display = \"none\";\n        p2pArrivalLoad();\n    }\n}\n<\/script>\n","protected":false},"excerpt":{"rendered":"<p>A linha de bordar para os gr\u00e1ficos criados com o gerador de gr\u00e1ficos de ponto cruz Pic2Pat pode ser encomendada facilmente atrav\u00e9s da nossa ferramenta de encomenda. Basta introduzir o n\u00famero do gr\u00e1fico para obter a lista de cores. Depois, todas as cores podem ser adicionadas ao carrinho de uma s\u00f3 vez.<\/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-30942","page","type-page","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Ferramenta de Encomenda - 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\/pt-pt\/ferramenta-de-encomenda\/\" \/>\n<meta property=\"og:locale\" content=\"pt_PT\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Ferramenta de Encomenda - Pic2Pat\" \/>\n<meta property=\"og:description\" content=\"A linha de bordar para os gr\u00e1ficos criados com o gerador de gr\u00e1ficos de ponto cruz Pic2Pat pode ser encomendada facilmente atrav\u00e9s da nossa ferramenta de encomenda. Basta introduzir o n\u00famero do gr\u00e1fico para obter a lista de cores. Depois, todas as cores podem ser adicionadas ao carrinho de uma s\u00f3 vez.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/webshop.pic2pat.com\/pt-pt\/ferramenta-de-encomenda\/\" \/>\n<meta property=\"og:site_name\" content=\"Pic2Pat\" \/>\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:\\\/\\\/webshop.pic2pat.com\\\/pt-pt\\\/ferramenta-de-encomenda\\\/\",\"url\":\"https:\\\/\\\/webshop.pic2pat.com\\\/pt-pt\\\/ferramenta-de-encomenda\\\/\",\"name\":\"Ferramenta de Encomenda - Pic2Pat\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/webshop.pic2pat.com\\\/pt-pt\\\/#website\"},\"datePublished\":\"2026-10-29T20:39:44+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/webshop.pic2pat.com\\\/pt-pt\\\/ferramenta-de-encomenda\\\/#breadcrumb\"},\"inLanguage\":\"pt-PT\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/webshop.pic2pat.com\\\/pt-pt\\\/ferramenta-de-encomenda\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/webshop.pic2pat.com\\\/pt-pt\\\/ferramenta-de-encomenda\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/webshop.pic2pat.com\\\/pt-pt\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Ferramenta de Encomenda\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/webshop.pic2pat.com\\\/pt-pt\\\/#website\",\"url\":\"https:\\\/\\\/webshop.pic2pat.com\\\/pt-pt\\\/\",\"name\":\"Pic2Pat\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/webshop.pic2pat.com\\\/pt-pt\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"pt-PT\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Ferramenta de Encomenda - 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\/pt-pt\/ferramenta-de-encomenda\/","og_locale":"pt_PT","og_type":"article","og_title":"Ferramenta de Encomenda - Pic2Pat","og_description":"A linha de bordar para os gr\u00e1ficos criados com o gerador de gr\u00e1ficos de ponto cruz Pic2Pat pode ser encomendada facilmente atrav\u00e9s da nossa ferramenta de encomenda. Basta introduzir o n\u00famero do gr\u00e1fico para obter a lista de cores. Depois, todas as cores podem ser adicionadas ao carrinho de uma s\u00f3 vez.","og_url":"https:\/\/webshop.pic2pat.com\/pt-pt\/ferramenta-de-encomenda\/","og_site_name":"Pic2Pat","twitter_card":"summary_large_image","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/webshop.pic2pat.com\/pt-pt\/ferramenta-de-encomenda\/","url":"https:\/\/webshop.pic2pat.com\/pt-pt\/ferramenta-de-encomenda\/","name":"Ferramenta de Encomenda - Pic2Pat","isPartOf":{"@id":"https:\/\/webshop.pic2pat.com\/pt-pt\/#website"},"datePublished":"2026-10-29T20:39:44+00:00","breadcrumb":{"@id":"https:\/\/webshop.pic2pat.com\/pt-pt\/ferramenta-de-encomenda\/#breadcrumb"},"inLanguage":"pt-PT","potentialAction":[{"@type":"ReadAction","target":["https:\/\/webshop.pic2pat.com\/pt-pt\/ferramenta-de-encomenda\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/webshop.pic2pat.com\/pt-pt\/ferramenta-de-encomenda\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/webshop.pic2pat.com\/pt-pt\/"},{"@type":"ListItem","position":2,"name":"Ferramenta de Encomenda"}]},{"@type":"WebSite","@id":"https:\/\/webshop.pic2pat.com\/pt-pt\/#website","url":"https:\/\/webshop.pic2pat.com\/pt-pt\/","name":"Pic2Pat","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/webshop.pic2pat.com\/pt-pt\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"pt-PT"}]}},"_links":{"self":[{"href":"https:\/\/webshop.pic2pat.com\/pt-pt\/wp-json\/wp\/v2\/pages\/30942","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webshop.pic2pat.com\/pt-pt\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/webshop.pic2pat.com\/pt-pt\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/webshop.pic2pat.com\/pt-pt\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/webshop.pic2pat.com\/pt-pt\/wp-json\/wp\/v2\/comments?post=30942"}],"version-history":[{"count":0,"href":"https:\/\/webshop.pic2pat.com\/pt-pt\/wp-json\/wp\/v2\/pages\/30942\/revisions"}],"wp:attachment":[{"href":"https:\/\/webshop.pic2pat.com\/pt-pt\/wp-json\/wp\/v2\/media?parent=30942"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}