Sometimes you may want to display a compact shopping cart on your sidebar or in a post. This allows the users to see that they have items in the cart and they can click a view cart button to go to the full shopping cart page.
Use the following shortcode where you want to show the compact shopping cart:
You can add this shortcode in a standard text widget to add the compact cart to the sidebar of your theme.
When there are no items in the cart, the shorcode will produce the following output:
When users add item(s) to the cart, it will show a compact shopping cart output like the following:
Clicking the “view cart” link will take them to the page that you specified in the “Checkout Page URL” field of the plugin settings.
Compact Cart Style 2
This second compact cart uses a different style than the one mentioned above. It looks like the following example:
To use this compact cart on your site, use the following shortcode:
You can add this shortcode in a standard text widget to add it to the sidebar of your site.
Creating a Specific Checkout Page for Your Site
You should create a checkout page before using the compact cart shortcode. Here is how to do it (if you haven’t done it already):
Step 1) Create a new WordPress page
Step 2) Add the following shortcode to this newly created page
Step 3) Go to the plugin settings and specify the URL of this newly created page in the “Checkout Page URL” field.
Showing a Compact Cart In Your Theme’s Header
Add the following code in your “header.php” file to show a compact cart in your theme’s header area:
<?php echo do_shortcode('[wp_compact_cart]'); ?>
Note: We provide technical support for our premium plugins via our customer only support forum