Resources

Handling your Acquia Commerce Manager cart

The Acquia Commerce Manager Drupal modules provide an Add to Cart button for every product page, along with several blocks for displaying cart information to your customers. The cart blocks interface with the Commerce Connector Service to manage the cart and relay this information to the commerce back end so all of your systems remain synchronized.

When a visitor is signed in and shopping, the state of their cart is saved even if the visitor leaves the website and then returns to sign in later.

The cart blocks display their contents from the session stored cart object and do not make a request back to the Commerce Connector Service when displaying their information.

Available cart blocks

Feature

Cart block

Cart form block

Cart mini block

Per-item list summary

Yes

Yes

No

Displays discounts

Yes

Yes

No

Accepts customer changes

No

Yes

No

Displays totals

Yes

Yes

Yes

Using cart blocks

Blocks provided by Acquia Commerce Manager are used in the same fashion as any other Drupal block. They are provided in the custom block list, and can be placed using the normal block system. For more details about blocks, see Working with blocks on Drupal.org.

As an example to quickly get started using blocks, the following procedure describes adding a cart mini block to your website’s header:

  1. Sign into your Drupal website as an administrator.

  2. Go to Structure > Block layout.

  3. Select a region to add a block to (in this case, Header), and then click Place block next to that region’s name. The list of available blocks appears.

  4. Next to your block (for this example, Cart Mini Block), click Place block.

  5. In the Configure block dialog box, make your configuration changes.

  6. Click Save block.

Your cart block will now appear in your header.

Theming cart blocks

In general, cart block theming is handled by standard Drupal theming for tables and related items. Any specialized theming requirements are noted on a cart block’s documentation page.