[-] BO: Don't display delete icon for order carts

This commit is contained in:
Rémi Gaillard
2013-02-05 15:28:09 +01:00
parent 64d7655c6e
commit c80e0f48be
2 changed files with 15 additions and 0 deletions
+5
View File
@@ -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);
}
}