ShoppingCart_Controller::debug PHP Method

debug() public method

Displays order info and cart contents.
public debug ( )
    public function debug()
    {
        if (Director::isDev() || Permission::check("ADMIN")) {
            //TODO: allow specifying a particular id to debug
            Requirements::css(SHOP_DIR . "/css/cartdebug.css");
            $order = ShoppingCart::curr();
            $content = $order ? Debug::text($order) : "Cart has not been created yet. Add a product.";
            return array('Content' => $content);
        }
    }