{"id":1676513,"date":"2020-09-15T12:47:46","date_gmt":"2020-09-15T12:47:46","guid":{"rendered":"https:\/\/toolset.com\/?post_type=course-lesson&#038;p=1676513"},"modified":"2021-05-18T14:47:37","modified_gmt":"2021-05-18T14:47:37","slug":"creating-a-custom-list-of-related-products","status":"publish","type":"course-lesson","link":"https:\/\/toolset.com\/fr\/course-lesson\/creating-a-custom-list-of-related-products\/","title":{"rendered":"Creating a Custom List of Related WooCommerce Products"},"content":{"rendered":"<div class=\"wp-block-image\">\n<figure class=\" tb-image tb-image-media aligncenter\" data-toolset-blocks-image=\"8865011950652eed88a800b287390022\"><a href=\"https:\/\/toolset.com\/wp-content\/uploads\/2020\/09\/related-product-custom-view.png\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/toolset.com\/wp-content\/uploads\/2020\/09\/related-product-custom-view-500x212.png\" alt=\"Custom list of related products\" class=\"wp-image-1770475\"\/><\/a><div class=\"tb-image-caption\"><figcaption>Custom list of related products<\/figcaption><\/div><\/figure>\n<\/div>\n\n\n<p>You can fully control the appearance of your output and the set of fields to display. <\/p>\n\n\n\n<p>You can even add your own filter to select related products. For example, instead of connecting the products by product categories you might want to use a custom taxonomy or a custom field.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Steps to Create a Custom List of Related Products<\/h2>\n\n\n\n<p>To create a custom list of related products, you need to create a View inside your <a href=\"https:\/\/toolset.com\/fr\/lesson-placement\/lesson-placements-1666453-1666547\/\">single-product template<\/a>.<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>Go to<strong> Toolset<\/strong> <strong>\u2192&nbsp;<\/strong> <strong>Dashboard<\/strong> and in the <strong>Products <\/strong>row, click to open your template for editing.<\/li><li>Insert the <strong>View <\/strong>block.<\/li><li>In the wizard, when selecting the content to display, select related products, upsells, or cross-sells.<\/li><\/ol>\n\n\n<div class=\"wp-block-image\">\n<figure class=\" tb-image tb-image-media aligncenter\" data-toolset-blocks-image=\"e1723bd80be7041716b5d9cab4c9c4e3\"><a href=\"https:\/\/toolset.com\/wp-content\/uploads\/2020\/09\/toolset-woocommerce-display-related-products.png\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/toolset.com\/wp-content\/uploads\/2020\/09\/toolset-woocommerce-display-related-products-500x332.png\" alt=\"\" class=\"wp-image-1775927\"\/><\/a><div class=\"tb-image-caption\"><figcaption>Selecting Related products, UpSells, or Cross-Sells when creating a custom list of Products<\/figcaption><\/div><\/figure>\n<\/div>\n\n\n<p>That&#8217;s it, all you need to do now is add blocks to the View, with product fields of your choice.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Displaying a List of Products Related by a Custom Taxonomy<\/h3>\n\n\n\n<p>With Toolset, you can also <a href=\"https:\/\/toolset.com\/fr\/course-lesson\/adding-a-custom-taxonomy-to-woocommerce-products\/\">set up a custom taxonomy for WooCommerce products<\/a>.<\/p>\n\n\n\n<p>Use the following steps to display a list of products that are related by such custom taxonomies:<\/p>\n\n\n\n<ol class=\"wp-block-list\" id=\"block-3c10f05e-fda8-4f8d-81aa-e24f6e0ab86e\"><li>Go to<strong> Toolset<\/strong> <strong>\u2192&nbsp;<\/strong> <strong>Dashboard<\/strong> and in the <strong>Products <\/strong>row, click to open your template for editing.<\/li><li>Insert the <strong>View <\/strong>block.<\/li><li>In the wizard, when selecting the content to display, select <strong>Products <\/strong>\u2192 <strong>All products<\/strong>.<\/li><li>Once the View is created, click to select the main&nbsp;<strong>View&nbsp;<\/strong>block.<\/li><li>In the right sidebar, expand the&nbsp;<strong>Content Selection<\/strong>&nbsp;section.<\/li><li>Click&nbsp;<strong>Add a filter<\/strong>&nbsp;and in the dialog that appears, select to filter by your custom taxonomy (i.e. &#8220;Departments&#8221;) and set it to the <strong>page where this View is shown<\/strong> option.<\/li><\/ol>\n\n\n<div class=\"wp-block-image\">\n<figure class=\" tb-image tb-image-media aligncenter\" data-toolset-blocks-image=\"c05fbebd2cd3bd9a2abd7b59efefe76d\"><a href=\"https:\/\/toolset.com\/wp-content\/uploads\/2020\/09\/toolset-woocommerce-display-products-related-by-custom-taxonomy.png\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/toolset.com\/wp-content\/uploads\/2020\/09\/toolset-woocommerce-display-products-related-by-custom-taxonomy-500x236.png\" alt=\"\" class=\"wp-image-1775979\"\/><\/a><div class=\"tb-image-caption\"><figcaption>Setting up a filter to connect products by custom taxonomy<\/figcaption><\/div><\/figure>\n<\/div>","protected":false},"author":4341,"featured_media":1712683,"template":"","related-lesson":[8445],"class_list":["post-1676513","course-lesson","type-course-lesson","status-publish","has-post-thumbnail","hentry","related-lesson-e-commerce"],"_links":{"self":[{"href":"https:\/\/toolset.com\/fr\/wp-json\/wp\/v2\/course-lesson\/1676513","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/toolset.com\/fr\/wp-json\/wp\/v2\/course-lesson"}],"about":[{"href":"https:\/\/toolset.com\/fr\/wp-json\/wp\/v2\/types\/course-lesson"}],"author":[{"embeddable":true,"href":"https:\/\/toolset.com\/fr\/wp-json\/wp\/v2\/users\/4341"}],"version-history":[{"count":8,"href":"https:\/\/toolset.com\/fr\/wp-json\/wp\/v2\/course-lesson\/1676513\/revisions"}],"predecessor-version":[{"id":2059971,"href":"https:\/\/toolset.com\/fr\/wp-json\/wp\/v2\/course-lesson\/1676513\/revisions\/2059971"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/toolset.com\/fr\/wp-json\/wp\/v2\/media\/1712683"}],"wp:attachment":[{"href":"https:\/\/toolset.com\/fr\/wp-json\/wp\/v2\/media?parent=1676513"}],"wp:term":[{"taxonomy":"related-lesson","embeddable":true,"href":"https:\/\/toolset.com\/fr\/wp-json\/wp\/v2\/related-lesson?post=1676513"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}