{"id":5822,"date":"2021-01-17T10:46:00","date_gmt":"2021-01-17T10:46:00","guid":{"rendered":"https:\/\/musilda.cz\/?p=5822"},"modified":"2021-01-17T10:46:00","modified_gmt":"2021-01-17T10:46:00","slug":"jak-upravit-order-meta-ve-woocommerce","status":"publish","type":"post","link":"https:\/\/affinite.io\/cs\/jak-upravit-order-meta-ve-woocommerce\/","title":{"rendered":"Jak upravit order meta ve WooCommerce"},"content":{"rendered":"\n

Krom\u011b post meta u objedn\u00e1vky, m\u00e1 WooCommerce vlastn\u00ed meta pro ka\u017edou polo\u017eku objedn\u00e1vky. Pomoc\u00ed pluginu je dok\u00e1\u017eeme jednodu\u0161e upravit. <\/p>\n\n\n\n

Nejprve trochu pov\u00edd\u00e1n\u00ed o tom, jak je rozd\u00edl, mezi order meta a order item meta. <\/p>\n\n\n\n

Order meta<\/h2>\n\n\n\n

Meta pole objedn\u00e1vky jsou tak\u00e9 zn\u00e1m\u00e1 jako custom fileds. Jedn\u00e1 se o data, ulo\u017een\u00ed v tabulce postmeta, kter\u00e1 jsou p\u00e1rovan\u00e1 podle id s postem. proto\u017ee je objedn\u00e1vka post, tak order meta jsou data ulo\u017een\u00e1 v t\u00e9to tabulce. Pracuje se s nimi stejn\u011b, jako u str\u00e1nek a \u010dl\u00e1nk\u016f. <\/p>\n\n\n\n

Order item meta<\/h2>\n\n\n\n

Ka\u017ed\u00e1 objedn\u00e1vka m\u00e1 sv\u00e9 polo\u017eky. Jsou to produkty, doprava, kup\u00f3ny a poplatky. <\/p>\n\n\n\n

WooCommerce si pro polo\u017eky objedn\u00e1vky vytvo\u0159\u00ed v datab\u00e1zi dv\u011b tabulky – order items a order item meta. Do prvn\u00ed ukl\u00e1d\u00e1 polo\u017eku a do druh\u00e9 dopl\u0148uj\u00edc\u00ed informace. <\/p>\n\n\n\n

Pokud nap\u0159\u00edklad koup\u00edte variantu produktu, v order item meta jsou ulo\u017een\u00e9 vlastnosti. Tak\u00e9 \u0159ada plugin\u016f, jako je t\u0159eba WooCommerce Product Extra Options<\/a>, do item meta ukl\u00e1d\u00e1 hodnoty z formul\u00e1\u0159e. <\/p>\n\n\n\n

Bohu\u017eel, k t\u011bmto \u00fadaj\u016fm se v administraci nedostanete. <\/p>\n\n\n\n

Order Meta Editor for Woocommerce<\/h2>\n\n\n\n

Editaci t\u011bchto \u00fadaj\u016f v\u00e1m umo\u017en\u00ed plugin Order meta Editor for WooCommerce, kter\u00fd je k dispozici zdarma na WordPress.org<\/a><\/p>\n\n\n\n

\"\"<\/a><\/figure>\n\n\n\n

Po instalaci pluginu se v\u00e1m v nab\u00eddce menu pod volbou WooCommerce uk\u00e1\u017ee polo\u017eka Order Meta editor.<\/p>\n\n\n\n

\"\"<\/a><\/figure>\n\n\n\n

Do pole formul\u00e1\u0159e zad\u00e1te id objedn\u00e1vky, jej\u00ed\u017e data chcete upravovat<\/p>\n\n\n\n

\"\"<\/a><\/figure>\n\n\n\n

A pak u\u017e m\u016f\u017eete upravovat jednotliv\u00e9 hodnoty item meta, pro ka\u017edou polo\u017eku:<\/p>\n\n\n\n

\"\"<\/a><\/figure>\n\n\n\n

Jen d\u00e1vejte pozor, a\u0165 nep\u0159ep\u00ed\u0161ete n\u011bco co pot\u0159ebujete, nov\u00e9 hodnoty se v\u00e1m tam budou dopl\u0148ovat dost \u0161patn\u011b. <\/p>\n\n\n\n

Z\u00e1v\u011br<\/h2>\n\n\n\n

M\u00e1m r\u00e1d tyto „mal\u00e9“, jedno\u00fa\u010delov\u00e9 pluginy, kter\u00e9 v\u00e1m v ur\u010ditou chv\u00edli mohou zachr\u00e1nit ……<\/p>\n\n\n\n

Ne ka\u017ed\u00fd v\u00ed, kde a co p\u0159epsat v datab\u00e1zi. <\/p>\n","protected":false},"excerpt":{"rendered":"

Krom\u011b post meta u objedn\u00e1vky, m\u00e1 WooCommerce vlastn\u00ed meta pro ka\u017edou polo\u017eku objedn\u00e1vky. Pomoc\u00ed pluginu je dok\u00e1\u017eeme jednodu\u0161e upravit. Nejprve trochu pov\u00edd\u00e1n\u00ed o tom, jak je rozd\u00edl, mezi order meta a order item meta. Order meta Meta pole objedn\u00e1vky jsou tak\u00e9 zn\u00e1m\u00e1 jako custom fileds. Jedn\u00e1 se o data, ulo\u017een\u00ed v tabulce postmeta, kter\u00e1 jsou<\/p>\n","protected":false},"author":1,"featured_media":9544,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[25,27],"tags":[],"class_list":["post-5822","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-woocommerce","category-woocommerce-pluginy"],"_links":{"self":[{"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/posts\/5822"}],"collection":[{"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/comments?post=5822"}],"version-history":[{"count":0,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/posts\/5822\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/media\/9544"}],"wp:attachment":[{"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/media?parent=5822"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/categories?post=5822"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/tags?post=5822"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}