{"id":2753,"date":"2019-06-18T16:01:50","date_gmt":"2019-06-18T16:01:50","guid":{"rendered":"https:\/\/croissant.huysmans.me\/?post_type=manual_documentation&#038;p=2753"},"modified":"2019-06-18T16:03:08","modified_gmt":"2019-06-18T16:03:08","slug":"product-variant-swatches","status":"publish","type":"manual_documentation","link":"https:\/\/croissant.huysmans.me\/fr\/documentation\/shop\/product-variant-swatches\/","title":{"rendered":"Product variant swatches"},"content":{"rendered":"<p>If you use product variants in your shop, you can optionally decide to display the variants in 3 different ways.\u00a0<strong>Please note that these optinal variant options will only be displayed if a product has a single variant type (ex: color). If your product has more than 1 (ex: Size + Color), the default variant dropdown will be displayed.<\/strong><\/p>\n<div class=\"row\">\n<div class=\"col-md-6\">\n<h4>Default<\/h4>\n<p><img decoding=\"async\" class=\"img-responsive img-thumbnail\" src=\"http:\/\/voila.huysmans.me\/images\/img-variant-1.png\" alt=\"\" \/><\/div>\n<div class=\"col-md-6\">\n<h4>Squares<\/h4>\n<p><img decoding=\"async\" class=\"img-responsive img-thumbnail\" src=\"http:\/\/voila.huysmans.me\/images\/img-variant-2.png\" alt=\"\" \/><\/div>\n<\/div>\n<div class=\"row\">\n<div class=\"col-md-6\">\n<h4>Coloured circle<\/h4>\n<p><img decoding=\"async\" class=\"img-responsive img-thumbnail\" src=\"http:\/\/voila.huysmans.me\/images\/img-variant-3.png\" alt=\"\" \/><\/div>\n<div class=\"col-md-6\">\n<h4>Image circle<\/h4>\n<p><img decoding=\"async\" class=\"img-responsive img-thumbnail\" src=\"http:\/\/voila.huysmans.me\/images\/img-variant-4.png\" alt=\"\" \/><\/div>\n<\/div>\n<ol>\n<li>To get started, enable the &#8220;Show variant picker (square, color or image)&#8221; theme option.<\/li>\n<li>Then select if you want to show the custom variant picker on all products by default, or if you want enable it for certain products only.\n<ul>\n<li><strong>Show variant picker by default on all products<\/strong>If you select this option, the square variant picker will be displayed by default on\u00a0<strong>ALL products<\/strong>\u00a0as long as there is not more than 1 type of product variant. If you want to\u00a0<strong>disable<\/strong>\u00a0the variant picker for a specific product, type in &#8220;<strong>disabled<\/strong>&#8221; in the Data 03 field of the product. To enable the Data 01, Data 02 and Data 03 field, please visit\u00a0<strong>backoffice &gt; Settings &gt; Workflow<\/strong>\u00a0and enable &#8220;custom template data&#8221; option. Once that is enabled, a new set of field will be added at the bottom of your products forms.<br \/>\nYou can also\u00a0<strong>replace<\/strong>\u00a0the main size guide by another one by following the steps in the section below.<\/p>\n<p>If you want to enable the\u00a0<strong>coloured circle<\/strong>\u00a0or the\u00a0<strong>image circle<\/strong>, please refer to the section below<\/li>\n<li><strong>On specific products<\/strong>Select this option if you do not want to display the variant picker on all product pages by default, but want to enable it on specific products. To\u00a0<strong>show<\/strong>\u00a0the square variant picker for a specific product, type in &#8220;<strong>enabled<\/strong>&#8221; in the Data 03 field of the product page.\n<p>If you want to enable the\u00a0<strong>coloured circle<\/strong>\u00a0or the\u00a0<strong>image circle<\/strong>, please refer to the section below<\/li>\n<li><strong>Enable the coloured circle<\/strong>To enable the couloured circle, you must manually enter a comma separated list of HEX code (ex: &#8220;#de4748&#8221;) with the hastag in front of each HEX code. All codes must be in the\u00a0<strong>exact same order<\/strong>\u00a0as the variants in the &#8220;INVENTORY &amp; VARIANTS&#8221; section of your product settings. Here is an example displaying 4 couloured circle: &#8220;#164371, #616161, #e5e6ab, #ffffff&#8221;.<\/li>\n<li><strong>Enable the image circle<\/strong>To enable the image circle, you must manually enter a comma separated list of image URL extentions (ex: &#8220;\/198866666\/texture-metal2.jpg, \/198866660\/texture-metal1.jpg&#8221;) with the \/ in front of each URL extentions. To upload an image, go to\u00a0<strong>Backoffice &gt; Tools &gt; Files<\/strong>\u00a0and click on &#8220;Upload files&#8221;. Once the image is uploaded, copy the part of the URL that comes\u00a0<strong>AFTER<\/strong>\u00a0&#8220;https:\/\/cdn.webshopapp.com\/shops\/STORE_ID\/files&#8230;&#8221; as seen in the image below:\n<p><img decoding=\"async\" class=\"img-responsive img-thumbnail\" src=\"http:\/\/voila.huysmans.me\/images\/img-variant-image-url.png\" alt=\"\" \/>We recomment uploading a small square 60px by 60px image. All URLs must be in the\u00a0<strong>exact same order<\/strong>\u00a0as the variants in the &#8220;INVENTORY &amp; VARIANTS&#8221; section of your product settings.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n","protected":false},"author":1,"featured_media":0,"parent":1791,"menu_order":0,"template":"","manualdocumentationcategory":[17],"manual_doc_tag":[],"class_list":["post-2753","manual_documentation","type-manual_documentation","status-publish","hentry","manualdocumentationcategory-croissant-documentation"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/croissant.huysmans.me\/fr\/wp-json\/wp\/v2\/manual_documentation\/2753","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/croissant.huysmans.me\/fr\/wp-json\/wp\/v2\/manual_documentation"}],"about":[{"href":"https:\/\/croissant.huysmans.me\/fr\/wp-json\/wp\/v2\/types\/manual_documentation"}],"author":[{"embeddable":true,"href":"https:\/\/croissant.huysmans.me\/fr\/wp-json\/wp\/v2\/users\/1"}],"version-history":[{"count":3,"href":"https:\/\/croissant.huysmans.me\/fr\/wp-json\/wp\/v2\/manual_documentation\/2753\/revisions"}],"predecessor-version":[{"id":2756,"href":"https:\/\/croissant.huysmans.me\/fr\/wp-json\/wp\/v2\/manual_documentation\/2753\/revisions\/2756"}],"up":[{"embeddable":true,"href":"https:\/\/croissant.huysmans.me\/fr\/wp-json\/wp\/v2\/manual_documentation\/1791"}],"wp:attachment":[{"href":"https:\/\/croissant.huysmans.me\/fr\/wp-json\/wp\/v2\/media?parent=2753"}],"wp:term":[{"taxonomy":"manualdocumentationcategory","embeddable":true,"href":"https:\/\/croissant.huysmans.me\/fr\/wp-json\/wp\/v2\/manualdocumentationcategory?post=2753"},{"taxonomy":"manual_doc_tag","embeddable":true,"href":"https:\/\/croissant.huysmans.me\/fr\/wp-json\/wp\/v2\/manual_doc_tag?post=2753"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}