Header Cart

Place Cart Icon in page header

Header Cart

Captina offers a simple mechanism for putting a shopping cart icon in the header of a
page. It shows the number of items in the cart, and when clicked on takes the user to the
store.

This requires just the two lines below for integration on your site.

Here's what to include:

<script src="https://{your back-end domain}/lz_client/base.min.js"></script>
<script type="text/javascript">
    // you may optionally include one of the following but not both
    const cp_header_cart_anchor_id = '{id}';
    const cp_header_cart_anchor_class = '{className}';
</script>
<script src="https://{your back-end domain}/lz_client/header_cart_widget.js" ></script>

As a general rule, you should include it in the footer area of your site. It will
automatically suppress itself on the /order/ page (the webstore).

You can specify an element for the cart icon via the variable cp_header_cart_anchor_id. Alternatively, you can specify a className for the cart icon via the variable cp_header_cart_anchor_class (the icon will be attached to the first element in the DOM tree with that className).

If you specify neither, the icon will be attached to the document body.