pravinsiddhi Posted November 10, 2016 Share Posted November 10, 2016 (edited) Hello, I need some help to add bulk action on order list page in dashboard. I implement all code and bulck action functionality working but i get one issue and try to resolve it but not solve it. After my custom bulk action call when i click on pagination button always click last bulk action. I add two custom bulk action on order list for generate pdf and generate delivery slip. I trash full code and find out when my bulk action call that store in form action attribute so when i call other action lick click on pagination number for submit again with previous action which already set on form action. Any body know how to solve this issue? AdminOrdersController.php in override folder public function __construct() { parent::__construct(); $this->bulk_actions = array( 'printDeliverySlips' => array('text' => 'Print Delivery Slips', 'icon' => 'icon-truck'), 'printOrderInvoice' => array('text' => 'Print Order Invoice', 'icon' => 'icon-file-text') ); } protected function processBulkprintOrderInvoice(){ //echo "testing"; //die; if (is_array($this->boxes) && !empty($this->boxes)) { $reult = OrderInvoice::getByOrderIdInterval($this->boxes); if (count(OrderInvoice::getByOrderIdInterval($this->boxes))) { Tools::redirectAdmin($this->context->link->getAdminLink('AdminPdf').'&submitAction=generateOrderInvoicesPDF&orderids='.urlencode(json_encode($this->boxes))); } } //Tools::redirectAdmin($this->context->link->getAdminLink('AdminOrders')); } protected function processBulkprintDeliverySlips(){ if (is_array($this->boxes) && !empty($this->boxes)) { if (count(OrderInvoice::getByOrderIdDeliveryInterval($this->boxes))) { Tools::redirectAdmin($this->context->link->getAdminLink('AdminPdf').'&submitAction=generateOrderDeliveryInvoicesPDF&orderids='.urlencode(json_encode($this->boxes))); } } //Tools::redirectAdmin($this->context->link->getAdminLink('AdminOrders')); } Edited November 10, 2016 by pravinsiddhi (see edit history) Link to comment Share on other sites More sharing options...
Casper_O Posted October 4, 2017 Share Posted October 4, 2017 Long time since you wrote this, but did you find a solution? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now