{"id":6033,"date":"2022-09-30T13:44:23","date_gmt":"2022-09-30T10:44:23","guid":{"rendered":"https:\/\/creativethemes.com\/blocksy\/?post_type=documentation&#038;p=6033"},"modified":"2026-10-08T10:28:31","modified_gmt":"2026-10-08T07:28:31","slug":"cart","status":"publish","type":"documentation","link":"https:\/\/creativethemes.com\/blocksy\/docs\/header-elements\/cart\/","title":{"rendered":"Cart"},"content":{"rendered":"\n<div class=\"wp-block-group is-layout-constrained wp-block-group-is-layout-constrained\">\n<figure data-wp-context=\"{&quot;imageId&quot;:&quot;6adfb84b7dfeb&quot;}\" data-wp-interactive=\"core\/image\" data-wp-key=\"6adfb84b7dfeb\" class=\"wp-block-image size-full has-lightbox wp-lightbox-container\"><img decoding=\"async\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on--pointerdown=\"actions.preloadImage\" data-wp-on--pointerenter=\"actions.preloadImageWithDelay\" data-wp-on--pointerleave=\"actions.cancelPreload\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2022\/09\/Screenshot-2022-09-30-at-13.54.18.png\" alt=\"Cart element displayed inside a Blocksy header\" class=\"wp-image-6037\"\/><button\n\t\t\tclass=\"lightbox-trigger\"\n\t\t\ttype=\"button\"\n\t\t\taria-haspopup=\"dialog\"\n\t\t\tdata-wp-bind--aria-label=\"state.thisImage.triggerButtonAriaLabel\"\n\t\t\tdata-wp-init=\"callbacks.initTriggerButton\"\n\t\t\tdata-wp-on--click=\"actions.showLightbox\"\n\t\t\tdata-wp-style--right=\"state.thisImage.buttonRight\"\n\t\t\tdata-wp-style--top=\"state.thisImage.buttonTop\"\n\t\t>\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewBox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\" \/>\n\t\t\t<\/svg>\n\t\t<\/button><figcaption class=\"wp-element-caption\">The Cart element in action.<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The <strong>Cart<\/strong> element gives WooCommerce customers quick access to their current shopping cart directly from the website header. It can display the number of products in the cart, the current cart total and a mini-cart interface for reviewing or adjusting items without first visiting the Cart page.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To use it, open the <strong>Customiser \u2192 Header<\/strong>, drag the <strong>Cart<\/strong> element into the desired header row, and select it to configure its appearance and behaviour.<\/p>\n\n\n\n<div class=\"wp-block-group has-palette-color-8-color has-palette-color-1-background-color has-text-color has-background is-layout-constrained wp-block-group-is-layout-constrained\">\n<p class=\"is-style-info coblocks-alert-paragraph wp-block-paragraph\"><strong>WooCommerce required<\/strong><br>The Cart element is available when WooCommerce is installed and active on the website.<\/p>\n<\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-group is-layout-constrained wp-block-group-is-layout-constrained\">\n<h2 class=\"wp-block-heading\">Granular Controls<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Element Appearance<\/h3>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-995f960e wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:35%\">\n<figure data-wp-context=\"{&quot;imageId&quot;:&quot;6adfb84b888da&quot;}\" data-wp-interactive=\"core\/image\" data-wp-key=\"6adfb84b888da\" class=\"wp-block-image size-full has-lightbox wp-lightbox-container\"><img loading=\"lazy\" decoding=\"async\" width=\"640\" height=\"2452\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on--pointerdown=\"actions.preloadImage\" data-wp-on--pointerenter=\"actions.preloadImageWithDelay\" data-wp-on--pointerleave=\"actions.cancelPreload\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2022\/09\/Screenshot-2026-10-08-at-10.23.52.png\" alt=\"\" class=\"wp-image-15248\"\/><button\n\t\t\tclass=\"lightbox-trigger\"\n\t\t\ttype=\"button\"\n\t\t\taria-haspopup=\"dialog\"\n\t\t\tdata-wp-bind--aria-label=\"state.thisImage.triggerButtonAriaLabel\"\n\t\t\tdata-wp-init=\"callbacks.initTriggerButton\"\n\t\t\tdata-wp-on--click=\"actions.showLightbox\"\n\t\t\tdata-wp-style--right=\"state.thisImage.buttonRight\"\n\t\t\tdata-wp-style--top=\"state.thisImage.buttonTop\"\n\t\t>\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewBox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\" \/>\n\t\t\t<\/svg>\n\t\t<\/button><figcaption class=\"wp-element-caption\">Cart element appearance controls.<\/figcaption><\/figure>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:65%\">\n<h4 class=\"wp-block-heading\">Icon<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">Choose from six built-in cart icons to represent the element in the header. Blocksy Pro also lets you upload your own custom SVG icon.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The icon size can be configured responsively, allowing you to use different values for desktop, tablet and mobile devices.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Icon Badge<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">Enable the <strong>Icon Badge<\/strong> to display the number of products currently added to the customer&#8217;s cart.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Cart Total<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">Choose whether the current cart total is displayed alongside the cart icon, giving customers an immediate overview of the value of their cart.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Label<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">The Cart element includes several controls for displaying additional text alongside the cart icon:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Label Visibility<\/strong> &#8211; choose whether the label is displayed on <strong>desktop<\/strong>, <strong>tablet<\/strong> and <strong>mobile<\/strong> devices independently.<\/li>\n\n\n\n<li><strong>Label Position<\/strong> &#8211; place the label to the <strong>left<\/strong>, <strong>right<\/strong> or <strong>bottom<\/strong> of the cart icon.<\/li>\n\n\n\n<li><strong>Custom Label<\/strong> &#8211; customise the text displayed by the element. The default <code>{price}<\/code> placeholder dynamically outputs the current cart total, and can be combined with additional text if needed.<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">Hide Cart When Empty<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">Enable this option if you want the entire Cart element to remain hidden until the customer adds at least one product to their cart.<\/p>\n<\/div>\n<\/div>\n\n\n\n<h3 id=\"cart-drawer\" class=\"wp-block-heading\">Cart Drawer<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The Cart Drawer controls how customers preview and manage the contents of their cart after interacting with the header element.<\/p>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-995f960e wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:35%\">\n<figure data-wp-context=\"{&quot;imageId&quot;:&quot;6adfb84b8f8c0&quot;}\" data-wp-interactive=\"core\/image\" data-wp-key=\"6adfb84b8f8c0\" class=\"wp-block-image size-full has-lightbox wp-lightbox-container\"><img loading=\"lazy\" decoding=\"async\" width=\"640\" height=\"2060\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on--pointerdown=\"actions.preloadImage\" data-wp-on--pointerenter=\"actions.preloadImageWithDelay\" data-wp-on--pointerleave=\"actions.cancelPreload\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2022\/09\/Screenshot-2026-10-08-at-10.24.48.png\" alt=\"\" class=\"wp-image-15249\"\/><button\n\t\t\tclass=\"lightbox-trigger\"\n\t\t\ttype=\"button\"\n\t\t\taria-haspopup=\"dialog\"\n\t\t\tdata-wp-bind--aria-label=\"state.thisImage.triggerButtonAriaLabel\"\n\t\t\tdata-wp-init=\"callbacks.initTriggerButton\"\n\t\t\tdata-wp-on--click=\"actions.showLightbox\"\n\t\t\tdata-wp-style--right=\"state.thisImage.buttonRight\"\n\t\t\tdata-wp-style--top=\"state.thisImage.buttonTop\"\n\t\t>\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewBox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\" \/>\n\t\t\t<\/svg>\n\t\t<\/button><figcaption class=\"wp-element-caption\">Cart Drawer configuration options.<\/figcaption><\/figure>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:65%\">\n<h4 class=\"wp-block-heading\">Cart Drawer Type<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">Choose how the mini-cart is presented when the Cart element is opened:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Flyout<\/strong> &#8211; displays the cart in a compact panel attached to the header element.<\/li>\n\n\n\n<li><strong>Off Canvas<\/strong> &#8211; opens the cart inside a larger panel that slides in from the side of the browser window. This presentation is available with Blocksy Pro.<\/li>\n<\/ul>\n\n\n\n<div class=\"wp-block-group has-palette-color-8-color has-palette-color-1-background-color has-text-color has-background is-layout-constrained wp-block-group-is-layout-constrained\">\n<p class=\"is-style-info coblocks-alert-paragraph wp-block-paragraph\"><strong>Blocksy Pro<\/strong><br>The <strong>Off Canvas<\/strong> Cart Drawer is a Blocksy Pro feature. The standard Flyout mini-cart remains available without it.<\/p>\n<\/div>\n\n\n\n<h4 class=\"wp-block-heading\">Panel Width<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">When the <strong>Off Canvas<\/strong> drawer is selected, use the Panel Width control to define how much horizontal space the cart occupies when opened.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Reveal From<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">Choose whether the Off Canvas cart slides into view from the <strong>left<\/strong> or <strong>right<\/strong> side of the screen.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Open Cart Automatically<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">Automatically open the cart drawer after a customer successfully adds a product to their cart. This provides immediate confirmation of the action and lets them review the updated cart without opening it manually.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Automatic opening requires the add-to-cart action to be handled through AJAX. If adding a product performs a full page navigation or reload instead, the cart drawer cannot be opened automatically as part of that interaction.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Quantity Input<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">Enable quantity controls inside the mini-cart so customers can adjust the quantity of products already added to their cart without leaving the drawer.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Product Images<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">Control how product thumbnails are displayed inside the mini-cart. These settings apply regardless of whether you use the <strong>Flyout<\/strong> or <strong>Off Canvas<\/strong> Cart Drawer.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You can adjust the <strong>image ratio<\/strong> to control the proportions of each thumbnail and select the preferred <strong>image size<\/strong> used for the product images. This lets you balance image quality and available space while keeping the mini-cart layout consistent with the rest of your store.<\/p>\n<\/div>\n<\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-group is-layout-constrained wp-block-group-is-layout-constrained\">\n<h2 class=\"wp-block-heading\">Visual Reference<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The examples below show the difference between the standard Flyout mini-cart and Blocksy Pro&#8217;s Off Canvas presentation.<\/p>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-995f960e wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<figure data-wp-context=\"{&quot;imageId&quot;:&quot;6adfb84b96374&quot;}\" data-wp-interactive=\"core\/image\" data-wp-key=\"6adfb84b96374\" class=\"wp-block-image size-full has-lightbox wp-lightbox-container\"><img decoding=\"async\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on--pointerdown=\"actions.preloadImage\" data-wp-on--pointerenter=\"actions.preloadImageWithDelay\" data-wp-on--pointerleave=\"actions.cancelPreload\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2022\/09\/flyoutcart-scaled.jpg\" alt=\"Blocksy Cart element using the Flyout mini-cart design\" class=\"wp-image-6062\"\/><button\n\t\t\tclass=\"lightbox-trigger\"\n\t\t\ttype=\"button\"\n\t\t\taria-haspopup=\"dialog\"\n\t\t\tdata-wp-bind--aria-label=\"state.thisImage.triggerButtonAriaLabel\"\n\t\t\tdata-wp-init=\"callbacks.initTriggerButton\"\n\t\t\tdata-wp-on--click=\"actions.showLightbox\"\n\t\t\tdata-wp-style--right=\"state.thisImage.buttonRight\"\n\t\t\tdata-wp-style--top=\"state.thisImage.buttonTop\"\n\t\t>\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewBox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\" \/>\n\t\t\t<\/svg>\n\t\t<\/button><figcaption class=\"wp-element-caption\">Flyout mini-cart.<\/figcaption><\/figure>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<figure data-wp-context=\"{&quot;imageId&quot;:&quot;6adfb84b99d34&quot;}\" data-wp-interactive=\"core\/image\" data-wp-key=\"6adfb84b99d34\" class=\"wp-block-image size-full has-lightbox wp-lightbox-container\"><img decoding=\"async\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on--pointerdown=\"actions.preloadImage\" data-wp-on--pointerenter=\"actions.preloadImageWithDelay\" data-wp-on--pointerleave=\"actions.cancelPreload\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/creativethemes.com\/blocksy\/wp-content\/uploads\/2022\/09\/sidecart-scaled.jpg\" alt=\"Blocksy Pro Cart element using the Off Canvas mini-cart design\" class=\"wp-image-6063\"\/><button\n\t\t\tclass=\"lightbox-trigger\"\n\t\t\ttype=\"button\"\n\t\t\taria-haspopup=\"dialog\"\n\t\t\tdata-wp-bind--aria-label=\"state.thisImage.triggerButtonAriaLabel\"\n\t\t\tdata-wp-init=\"callbacks.initTriggerButton\"\n\t\t\tdata-wp-on--click=\"actions.showLightbox\"\n\t\t\tdata-wp-style--right=\"state.thisImage.buttonRight\"\n\t\t\tdata-wp-style--top=\"state.thisImage.buttonTop\"\n\t\t>\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewBox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\" \/>\n\t\t\t<\/svg>\n\t\t<\/button><figcaption class=\"wp-element-caption\">Off Canvas mini-cart.<\/figcaption><\/figure>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>The Cart element gives WooCommerce customers quick access to their current shopping cart directly from the website header. It can display the number of products in the cart, the current cart total and a mini-cart interface for reviewing or adjusting items without first visiting the Cart page. To use it, open the Customiser \u2192 Header, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"_acf_changed":false,"footnotes":""},"doc_categories":[124],"class_list":["post-6033","documentation","type-documentation","status-publish","hentry","doc_categories-header-elements"],"acf":[],"_links":{"self":[{"href":"https:\/\/creativethemes.com\/blocksy\/wp-json\/wp\/v2\/documentation\/6033","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/creativethemes.com\/blocksy\/wp-json\/wp\/v2\/documentation"}],"about":[{"href":"https:\/\/creativethemes.com\/blocksy\/wp-json\/wp\/v2\/types\/documentation"}],"author":[{"embeddable":true,"href":"https:\/\/creativethemes.com\/blocksy\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/creativethemes.com\/blocksy\/wp-json\/wp\/v2\/comments?post=6033"}],"version-history":[{"count":4,"href":"https:\/\/creativethemes.com\/blocksy\/wp-json\/wp\/v2\/documentation\/6033\/revisions"}],"predecessor-version":[{"id":15250,"href":"https:\/\/creativethemes.com\/blocksy\/wp-json\/wp\/v2\/documentation\/6033\/revisions\/15250"}],"wp:attachment":[{"href":"https:\/\/creativethemes.com\/blocksy\/wp-json\/wp\/v2\/media?parent=6033"}],"wp:term":[{"taxonomy":"doc_categories","embeddable":true,"href":"https:\/\/creativethemes.com\/blocksy\/wp-json\/wp\/v2\/doc_categories?post=6033"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}