1

Using magento 2, front and admin, I need to access controller in print button on sale order page to print invoice which generate pdf in front view controller. Plz.

1 Answer 1

2

If you need to do that, I am sure using redirect to your front end controller should be worked.

public function getPrintUrl()
{
    $baseUrl = $this->_urlInterface->getBaseUrl();
    return $baseUrl.'/order/printpdf/invoice_id/'.$this->getInvoice()->getId();
}
2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.