httpContext = $httpContext; } /** * Retrieve form action url and set "secure" param to avoid confirm * message when we submit form from secure page to unsecure * * @return string */ public function getFormActionUrl() { return $this->getUrl('checkout/cart/addgroup', ['_secure' => true]); } /** * Render "My Orders" sidebar block * * @return string */ protected function _toHtml() { $isValid = $this->httpContext->getValue(Context::CONTEXT_AUTH) || $this->getCustomerId(); return $isValid ? parent::_toHtml() : ''; } }