public static function direct($status = true)
    {
        if (Director::is_ajax()) {
            return (string)$status;
        }
        if (self::config()->direct_to_cart_page && ($cartlink = CartPage::find_link())) {
            return Controller::curr()->redirect($cartlink);
        } else {
            return Controller::curr()->redirectBack();
        }
    }
public static function direct($status = true)
    {
        if (Director::is_ajax()) {
            return (string)$status;
        }
        if (self::config()->direct_to_cart_page && ($cartlink = CartPage::find_link())) {
            return Controller::curr()->redirect($cartlink);
        } else {
            return Controller::curr()->redirectBack();
        }
    }
public static function direct ( $ status = true ) { if ( Director :: is_ajax ( ) ) { return ( string ) $ status ; } if ( self :: config ( ) -> direct_to_cart_page && ( $ cartlink = CartPage :: find_link ( ) ) ) { return Controller :: curr ( ) -> redirect ( $ cartlink ) ; } else { return Controller :: curr ( ) -> redirectBack ( ) ; } }
This is used here and in VariationForm and AddProductForm

@param bool|string $status

@return string|HTTPResponse
This is used here and in VariationForm and AddProductForm