Sidecart.php template file

From Shopp Documentation

Jump to: navigation, search

This article is marked as in need of review and editing. You can help make Shopp's documentation better by editing it.

The sidecart.php template provides a small summary of the shopping cart. It's intended to provide a summary of what is in the shopper's cart, without all of the detail and management controls of the main shopping cart provided by the cart.php template file. Any of the Cart Tags can be used to include any amount of information you need about the visitor's shopping cart.

The template can be used in two ways: as a sidebar widget or calling it with the shopp('cart','sidecart') tag.

Sidebar Cart Widget

In order to use the Shopp Cart widget, you'll need to make sure your theme is widget-enabled. If the theme you're using is not widget enabled, but you still would prefer to use the sidecart.php template as a widget you cant "widgetize" your theme by following instructions on the WordPress Codex - Widgetizing Themes.

To setup the Shopp Cart widget:

  • In your WordPress Admin, select DesignWidgets.
  • Find the Shopp Cart element near the bottom of the left column of available widgets.
  • Click the Add button.
  • The widget will now appear added under your selected sidebar location.
  • Drag the widget into the order of where you would like it to appear in your sidebar.
  • Click the Edit link on the Shopp Cart widget element to change the settings for the Shopp Cart widget.

sidecart shopp() tag

The other way to use the sidecart.php template is to call it in your WordPress theme files or Shopp theme template files using the shopp() tag:

<?php shopp('cart','sidecart'); ?>

Just include the line above in any of your WordPress theme files, as appropriate. For example, if you want a small cart to appear in your website's header, include the shopp('cart','sidecart') tag in the appropriate place in your WordPress theme's header.php file.