Welcome Guest, Not a member yet? Register   Sign In
Hide Button on Codeigniter
#5

(07-17-2017, 05:12 AM)sanditheresia Wrote: btw this is my order status

$data['order_status'] = ['wc-processing'=>'Processing', 'wc-on-hold'=>'On Hold', 'wc-completed'=>'Completed', 'wc-pending'=>'Pending'];

You are passing that from the controller to the view, aren't you?
It's an array of possible order statuses, right?
The table with orders is built up by a foreach {} loop, I guess.
In every iteration you should check the order status of the current record.
If that is 'Completed', don't show the button or disable it.
Reply


Messages In This Thread
Hide Button on Codeigniter - by sanditheresia - 07-17-2017, 01:41 AM
RE: Hide Button on Codeigniter - by Wouter60 - 07-17-2017, 03:42 AM
RE: Hide Button on Codeigniter - by sanditheresia - 07-17-2017, 05:12 AM
RE: Hide Button on Codeigniter - by Wouter60 - 07-17-2017, 07:24 AM
RE: Hide Button on Codeigniter - by ivantcholakov - 07-17-2017, 06:08 AM
RE: Hide Button on Codeigniter - by my_RZ - 07-17-2017, 07:24 AM
RE: Hide Button on Codeigniter - by sanditheresia - 07-17-2017, 07:37 AM
RE: Hide Button on Codeigniter - by my_RZ - 07-17-2017, 08:26 AM
RE: Hide Button on Codeigniter - by Wouter60 - 07-17-2017, 08:27 AM
RE: Hide Button on Codeigniter - by my_RZ - 07-17-2017, 08:31 AM



Theme © iAndrew 2016 - Forum software by © MyBB