[-] BO: Don't display delete icon for order carts
This commit is contained in:
@@ -175,6 +175,9 @@ class AdminControllerCore extends Controller
|
||||
|
||||
/** @var array required_fields to display in the Required Fields form */
|
||||
public $required_fields = array();
|
||||
|
||||
/** @var Helper */
|
||||
protected $helper;
|
||||
|
||||
/**
|
||||
* @var array actions to execute on multiple selections
|
||||
@@ -1635,6 +1638,8 @@ class AdminControllerCore extends Controller
|
||||
|
||||
// For each action, try to add the corresponding skip elements list
|
||||
$helper->list_skip_actions = $this->list_skip_actions;
|
||||
|
||||
$this->helper = $helper;
|
||||
}
|
||||
|
||||
public function setMedia()
|
||||
|
||||
@@ -746,4 +746,14 @@ class AdminCartsControllerCore extends AdminController
|
||||
{
|
||||
return ($echo == '0' ? Configuration::get('PS_SHOP_NAME') : $echo);
|
||||
}
|
||||
|
||||
public function displayDeleteLink($token = null, $id, $name = null)
|
||||
{
|
||||
// don't display ordered carts
|
||||
foreach ($this->_list as $row)
|
||||
if ($row['id_cart'] == $id && isset($row['id_order']) && $row['id_order'])
|
||||
return ;
|
||||
|
||||
return $this->helper->displayDeleteLink($token, $id, $name);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user