Commerce Cart View Override

Component ID

1621514

Component name

Commerce Cart View Override

Component type

module

Maintenance status

Development status

Component security advisory coverage

covered

Downloads

19430

Component created

Component changed

Component body

This module provides the ability to override the default cart page view for Drupal Commerce.

Sponsored by Commerce Guys

Reasons this module exists

  • The cart page view is not a view with a page display; therefore, you cannot just override the path.
  • The cart page uses a view (commerce_cart_form) that is hard coded in the menu callback for the path "cart"
  • The cart page view is not exportable since the default view is defined in Commerce Cart.

The Commerce Cart View Override module solves all of the problems and provides a way to select the view to display on the cart page.

Features Provided

  • Implements all module hooks and menu callbacks to override the cart page
  • Provides a settings for at "admin/commerce/config/cart-overrides" to specify the view to display on the cart page
  • Exportable - able to export a custom view for the cart page. (ie not commerce_cart_form)

Requirements

How to use

  1. Create a new cart view
    • Clone the existing view "Shopping cart form", machine name "commerce_cart_form"
    • Edit the machine name of the new view so that it starts with "commerce_cart_form", ie "commerce_cart_form_custom"
  2. Set the cart view to your new view
    • Navigate to Administer >> Store >> Configuration >> Cart Overrides
    • Select the new view
    • Save Configuration