{"id":4125,"date":"2017-08-28T08:44:45","date_gmt":"2017-08-28T08:44:45","guid":{"rendered":"http:\/\/musilda.cz\/?p=4125"},"modified":"2017-08-28T08:44:45","modified_gmt":"2017-08-28T08:44:45","slug":"obrazek-produktu-galerie-produktu","status":"publish","type":"post","link":"https:\/\/affinite.io\/cs\/obrazek-produktu-galerie-produktu\/","title":{"rendered":"Obr\u00e1zek produktu a galerie produktu"},"content":{"rendered":"\n

Obr\u00e1zek produktu je v eshopu jedna z ned\u016fle\u017eit\u011bj\u0161\u00edch \u010d\u00e1st\u00ed, proto\u017ee z\u00e1kazn\u00edk se dost \u010dasto rozhoduje „o\u010dima“.<\/p>\n\n\n\n

WooCommerce v tomto p\u0159\u00edpad\u011b pou\u017e\u00edv\u00e1 mechnismu n\u00e1hledov\u00fdch obr\u00e1zku, jen\u017e je ve WordPressu v\u0161eobecn\u011b zn\u00e1m\u00fd. Krom\u011b n\u00e1hledov\u00e9ho obr\u00e1zku v\u0161ak umo\u017e\u0148uje nav\u00edc vytvo\u0159it galerii produktu.<\/p>\n\n\n\n

Obr\u00e1zek produktu m\u016f\u017eeme naj\u00edt ve v\u00fdpisu produkt\u016f a na jeho detailu. Nejprve se pod\u00edv\u00e1me na detail produktu.<\/p>\n\n\n\n

Obr\u00e1zek produktu v detailu produktu<\/h2>\n\n\n\n

Ve v\u00fdchoz\u00edm zobrazen\u00ed detailu produktu se obr\u00e1zek zobrazuje v lev\u00e9 polovin\u011b obsahu, jen\u017e je pro zobrazen\u00ed detailu produktu ur\u010den.<\/p>\n\n\n

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

Jak m\u016f\u017eete vid\u011bt, v prav\u00e9 \u010d\u00e1sti jsou informace, jen\u017e se k produktu vztahuj\u00ed a v lev\u00e9 \u010d\u00e1sti je velk\u00fd obr\u00e1zek a pod n\u00edm mal\u00e9 n\u00e1hledy.<\/p>\n\n\n\n

Velk\u00fd obr\u00e1zek je „n\u00e1hledov\u00fd obr\u00e1zek“ a zad\u00e1v\u00e1 se v adminstraci produktu, v metaboxu na prav\u00e9 stran\u011b:<\/p>\n\n\n

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

Jakmile je vlo\u017een, je automaticky zobrazov\u00e1n ve v\u00fdpisech produkt\u016f a to jak v administraci, kde je vid\u011bt u ka\u017ed\u00e9ho produktu mal\u00fd n\u00e1hled:<\/p>\n\n\n

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

a z\u00e1rove\u0148 ve v\u00fdpisu produkt\u016f, a\u0165 se ji\u017e jedn\u00e1 o vypis kategorie, \u0161t\u00edtku, nebo str\u00e1nku obchodu:<\/p>\n\n\n

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

Galerie produktu<\/h2>\n\n\n\n

Na rozd\u00edl od „n\u00e1hledov\u00e9ho obr\u00e1zku“, kdy je obr\u00e1zek p\u0159i\u0159azen postu, funguje galerie produktu trochu jinak.<\/p>\n\n\n\n

Vytv\u00e1\u0159\u00ed se tak\u00e9 v metaboxu, ne prav\u00e9 stran\u011b administrace produktu:<\/p>\n\n\n

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

Kdy v medi\u00edch nahr\u00e1v\u00e1te a p\u0159id\u00e1v\u00e1te dal\u0161\u00ed obr\u00e1zky do galerie. Pokud podr\u017e\u00edte shift, m\u016f\u017eete jich kliknut\u00edm ozna\u010dit v\u00edce a vlo\u017eit je do galerie z\u00e1rove\u0148:<\/p>\n\n\n

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

WooCommerce si pak ulo\u017e\u00ed id t\u011bchto soubor\u016f do custom fieldu, se kter\u00fdm d\u00e1le pracuje a zobrazuje v\u0161echny obr\u00e1zky, jako sou\u010d\u00e1st galerie:<\/p>\n\n\n

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

Na frontendu to pak vypad\u00e1 n\u00e1sledovn\u011b:<\/p>\n\n\n

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

Existuj\u00ed pluginy, jen\u017e toto zobrazen\u00ed m\u011bn\u00ed do carouselu, tak\u017ee n\u00e1hledy nejsou takto pod sebou. Osobn\u011b to ale m\u00e1m rad\u011bji takto a nav\u00edc, kdy\u017e se jedn\u00e1 o obr\u00e1zky variant, je to velmi p\u0159ehledn\u00e9.<\/p>\n\n\n\n

P\u0159\u00ed\u0161t\u011b se pod\u00edv\u00e1me na recenze produktu.<\/p>\n","protected":false},"excerpt":{"rendered":"

Obr\u00e1zek produktu je v eshopu jedna z ned\u016fle\u017eit\u011bj\u0161\u00edch \u010d\u00e1st\u00ed, proto\u017ee z\u00e1kazn\u00edk se dost \u010dasto rozhoduje „o\u010dima“. WooCommerce v tomto p\u0159\u00edpad\u011b pou\u017e\u00edv\u00e1 mechnismu n\u00e1hledov\u00fdch obr\u00e1zku, jen\u017e je ve WordPressu v\u0161eobecn\u011b zn\u00e1m\u00fd. Krom\u011b n\u00e1hledov\u00e9ho obr\u00e1zku v\u0161ak umo\u017e\u0148uje nav\u00edc vytvo\u0159it galerii produktu. Obr\u00e1zek produktu m\u016f\u017eeme naj\u00edt ve v\u00fdpisu produkt\u016f a na jeho detailu. Nejprve se pod\u00edv\u00e1me na detail<\/p>\n","protected":false},"author":1,"featured_media":8732,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[25,26],"tags":[],"class_list":["post-4125","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-woocommerce","category-woocommerce-manual"],"_links":{"self":[{"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/posts\/4125"}],"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=4125"}],"version-history":[{"count":0,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/posts\/4125\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/media\/8732"}],"wp:attachment":[{"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/media?parent=4125"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/categories?post=4125"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/tags?post=4125"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}