{"id":1123,"date":"2019-11-27T11:24:58","date_gmt":"2019-11-27T18:24:58","guid":{"rendered":"https:\/\/help.foosales.com\/docs\/frequently-asked-questions\/errors\/why-do-i-get-a-network-error-when-submitting-an-order\/"},"modified":"2026-07-27T13:42:43","modified_gmt":"2026-07-27T19:42:43","slug":"dlaczego-podczas-skladania-zamowienia-pojawia-sie-blad-sieci","status":"publish","type":"docs","link":"https:\/\/help.foosales.com\/pl\/docs\/frequently-asked-questions\/errors\/why-do-i-get-a-network-error-when-submitting-an-order\/","title":{"rendered":"Dlaczego podczas sk\u0142adania zam\u00f3wienia pojawia si\u0119 b\u0142\u0105d sieci?"},"content":{"rendered":"<p>Je\u015bli jeste\u015b <strong>w stanie si\u0119 po\u0142\u0105czy\u0107<\/strong> do Twojego sklepu, ale otrzymasz <strong>b\u0142\u0105d sieci<\/strong> kiedy <strong>sk\u0142adanie zam\u00f3wienia<\/strong>mo\u017ce wyst\u0105pi\u0107 konfiguracja serwera uniemo\u017cliwiaj\u0105ca wys\u0142anie \u017c\u0105dania lub inny b\u0142\u0105d, kt\u00f3ry wyst\u0105pi\u0142 w back-endie WordPress.<\/p>\n<p>Aby sprawdzi\u0107, czy wyst\u0105pi\u0142 b\u0142\u0105d WordPress powoduj\u0105cy niepowodzenie po\u0142\u0105czenia, mo\u017cna otworzy\u0107 pulpit nawigacyjny administratora WordPress i przej\u015b\u0107 do sekcji <strong>WooCommerce <\/strong>-&gt;<strong> Status <\/strong>-&gt;<strong> Dzienniki<\/strong> i przegl\u0105da\u0107 najnowsze <strong>dziennik b\u0142\u0119d\u00f3w krytycznych<\/strong> wybieraj\u0105c j\u0105 z listy rozwijanej. Tutaj powiniene\u015b by\u0107 w stanie sprawdzi\u0107, czy s\u0105 jakie\u015b b\u0142\u0119dy zwi\u0105zane z FooSales lub ewentualnie konflikt z inn\u0105 wtyczk\u0105. Je\u015bli nie ma b\u0142\u0119d\u00f3w lub nic, co wydaje si\u0119 zwi\u0105zane z FooSales, mo\u017ce to by\u0107 konfiguracja serwera uniemo\u017cliwiaj\u0105ca wys\u0142anie \u017c\u0105dania.<\/p>\n<p>If you are not using web app that is bundled with the FooSales plugin on your own site and are using the hosted web app at <em>https:\/\/web.foosales.com<\/em>, FooSales will to your store from a domain that is different from your domain. Requests between different domains are known as <strong>\u017c\u0105dania udost\u0119pniania zasob\u00f3w mi\u0119dzy \u017ar\u00f3d\u0142ami (CORS)<\/strong>. Serwer musi zezwala\u0107 na tego typu \u017c\u0105dania. Zwykle serwery s\u0105 ju\u017c skonfigurowane tak, aby akceptowa\u0107 takie \u017c\u0105dania i zwraca\u0107 odpowied\u017a z odpowiednimi nag\u0142\u00f3wkami, ale niekt\u00f3re serwery mog\u0105 by\u0107 skonfigurowane tak, aby je blokowa\u0107. Przegl\u0105darka b\u0119dzie <strong>zapobiec \u017c\u0105daniu<\/strong> od uko\u0144czenia, je\u015bli odpowied\u017a nie ma warto\u015bci <strong>wymagane nag\u0142\u00f3wki<\/strong>.<\/p>\n<p>Serwer musi zwr\u00f3ci\u0107 warto\u015b\u0107 <strong>Nag\u0142\u00f3wek Access-Control-Allow-Origin<\/strong> kt\u00f3ry umo\u017cliwia FooSales publikowanie danych w sklepie. Mo\u017cesz spr\u00f3bowa\u0107 doda\u0107 nast\u0119puj\u0105cy kod do motywu WordPress <strong>functions.php<\/strong> aby sprawdzi\u0107, czy to co\u015b zmieni:<\/p>\n<pre>function add_foosales_cors_http_header(){\r\n    header(\"Access-Control-Allow-Origin: https:\/\/web.foosales.com\");\r\n}\r\nadd_action('init','add_foosales_cors_http_header');<\/pre>\n<p>Mo\u017cesz spr\u00f3bowa\u0107 u\u017cy\u0107\u00a0<strong>https:\/\/web.foosales.com<\/strong> lub po prostu <strong>*<\/strong> (gwiazdka, kt\u00f3ra dopuszcza dowolne pochodzenie) jako warto\u015b\u0107 pochodzenia.<\/p>\n<p>Je\u015bli powy\u017cszy kod nie zadzia\u0142a, powiniene\u015b by\u0107 w stanie sprawdzi\u0107, czy ten nag\u0142\u00f3wek jest w\u0142\u0105czony i jaka jest jego warto\u015b\u0107, je\u015bli masz dost\u0119p do konfiguracji serwera. Mo\u017cesz r\u00f3wnie\u017c skontaktowa\u0107 si\u0119 ze swoim <strong>administrator serwera<\/strong> lub <strong>hosting<\/strong> zapyta\u0107 o pozwolenie <strong>mi\u0119dzydomenowe \u017c\u0105dania API REST<\/strong> dla FooSales. Niekt\u00f3re przegl\u0105darki maj\u0105 r\u00f3wnie\u017c ustawienia, kt\u00f3re mo\u017cna dostosowa\u0107, aby zezwoli\u0107 na te \u017c\u0105dania dla FooSales. Alternatywnie mo\u017cna u\u017cy\u0107 pliku <strong>serwer proxy<\/strong> kt\u00f3ry zapewnia, \u017ce wszystkie prawid\u0142owe nag\u0142\u00f3wki s\u0105 ustawiane i zwracane mi\u0119dzy witryn\u0105 a FooSales.<\/p>\n<p>We recommend using the web app that is bundled with the plugin by launching the POS directly from your WordPress admin dashboard. Authentication is handled automatically and and server requests will be made from the same domain, therefore eliminating any CORS issues.<\/p>","protected":false},"featured_media":0,"parent":485,"menu_order":5,"comment_status":"open","ping_status":"closed","template":"","meta":{"site-sidebar-layout":"default","site-content-layout":"default","ast-site-content-layout":"default","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":"","ast-disable-related-posts":"","theme-transparent-header-meta":"default","adv-header-id-meta":"","stick-header-meta":"default","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"set","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"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":""},"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":""}},"_is_vendor_doc":"0","footnotes":""},"doc_tag":[98,101,102,103,104,105,106,107,108,109,110,21,16],"class_list":["post-1123","docs","type-docs","status-publish","hentry","doc_tag-api","doc_tag-blocked","doc_tag-cors","doc_tag-cross-origin","doc_tag-headers","doc_tag-network-error","doc_tag-permission","doc_tag-post","doc_tag-proxy","doc_tag-request","doc_tag-rest","doc_tag-rest-api","doc_tag-web-app"],"comment_count":0,"_links":{"self":[{"href":"https:\/\/help.foosales.com\/pl\/wp-json\/wp\/v2\/docs\/1123","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/help.foosales.com\/pl\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/help.foosales.com\/pl\/wp-json\/wp\/v2\/types\/docs"}],"replies":[{"embeddable":true,"href":"https:\/\/help.foosales.com\/pl\/wp-json\/wp\/v2\/comments?post=1123"}],"version-history":[{"count":2,"href":"https:\/\/help.foosales.com\/pl\/wp-json\/wp\/v2\/docs\/1123\/revisions"}],"predecessor-version":[{"id":56510,"href":"https:\/\/help.foosales.com\/pl\/wp-json\/wp\/v2\/docs\/1123\/revisions\/56510"}],"up":[{"embeddable":true,"href":"https:\/\/help.foosales.com\/pl\/wp-json\/wp\/v2\/docs\/485"}],"next":[{"title":"Dlaczego aplikacja si\u0119 zawiesza?","link":"https:\/\/help.foosales.com\/pl\/docs\/frequently-asked-questions\/errors\/why-does-the-app-crash\/","href":"https:\/\/help.foosales.com\/pl\/wp-json\/wp\/v2\/docs\/54724"}],"prev":[{"title":"Dlaczego podczas pr\u00f3by po\u0142\u0105czenia si\u0119 z moim sklepem pojawia si\u0119 b\u0142\u0105d sieci?","link":"https:\/\/help.foosales.com\/pl\/docs\/frequently-asked-questions\/errors\/why-do-i-get-a-network-error-when-trying-to-connect-to-my-store\/","href":"https:\/\/help.foosales.com\/pl\/wp-json\/wp\/v2\/docs\/54395"}],"wp:attachment":[{"href":"https:\/\/help.foosales.com\/pl\/wp-json\/wp\/v2\/media?parent=1123"}],"wp:term":[{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/help.foosales.com\/pl\/wp-json\/wp\/v2\/doc_tag?post=1123"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}