{"id":244,"date":"2021-05-09T10:17:18","date_gmt":"2021-05-09T10:17:18","guid":{"rendered":"https:\/\/utillz.com\/docs\/brikk\/2021\/05\/09\/how-to-allow-multiple-items-in-your-cart\/"},"modified":"2021-09-05T09:41:14","modified_gmt":"2021-09-05T09:41:14","slug":"how-to-allow-multiple-items-in-your-cart","status":"publish","type":"post","link":"https:\/\/utillz.com\/docs\/brikk\/how-to-allow-multiple-items-in-your-cart\/","title":{"rendered":"How to allow multiple items in your cart"},"content":{"rendered":"<h3 id=\"multiple-cart-items-of-different-type\">Multiple cart items of different type<\/h3>\n<p>By default, the theme will allow you to have only one cart item. You can easily change this by add the following code into your child theme&#8217;s functions.php file:<\/p>\n<pre>add_filter( 'routiz\/cart\/empty_cart', '__return_false');<\/pre>\n<h3 id=\"multiple-cart-items-of-the-same-type\">Multiple cart items of the same type<\/h3>\n<p>If you also want to enable multiple cart items <u>of the same type<\/u>, you need to edit the product type and change this. For example, if you want to have multiple plans, then edit the following file:<\/p>\n<p><strong>\\routiz\\inc\\src\\woocommerce\\products\\wc-product-listing-plan.php<\/strong><\/p>\n<p>and change <code>is_sold_individually<\/code> to <code>false<\/code>, like:<\/p>\n<pre>public function is_sold_individually() {\r\n    return false;\r\n}<\/pre>\n<p>You can find all the product types in the same folder:<\/p>\n<p><strong>\\routiz\\inc\\src\\woocommerce\\products\\<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Multiple cart items of different type By default, the theme will allow you to have only one cart item. You can easily change this by &#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/utillz.com\/docs\/brikk\/wp-json\/wp\/v2\/posts\/244"}],"collection":[{"href":"https:\/\/utillz.com\/docs\/brikk\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/utillz.com\/docs\/brikk\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/utillz.com\/docs\/brikk\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/utillz.com\/docs\/brikk\/wp-json\/wp\/v2\/comments?post=244"}],"version-history":[{"count":0,"href":"https:\/\/utillz.com\/docs\/brikk\/wp-json\/wp\/v2\/posts\/244\/revisions"}],"wp:attachment":[{"href":"https:\/\/utillz.com\/docs\/brikk\/wp-json\/wp\/v2\/media?parent=244"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/utillz.com\/docs\/brikk\/wp-json\/wp\/v2\/categories?post=244"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/utillz.com\/docs\/brikk\/wp-json\/wp\/v2\/tags?post=244"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}