we have customers that order and ship the products and they can see their orders but in this page prices and tax are shown and we don't want to show them the code is in sales/order/view/items.phtml
I will get my role name and then I can write if the role then not show:
$admin_user_session = Mage::getSingleton('admin/session'); $adminuserId = $admin_user_session->getUser()->getUserId(); $role_data = Mage::getModel('admin/user')->load($adminuserId)->getRole()->getData(); $role_name = $role_data['role_name']; Items.phtml:
<?php $_items = $this->getItemsCollection() ?> <?php $i=0;foreach ($_items as $_item):?> <?php if ($_item->getParentItem()) continue; else $i++;?> <tbody class="<?php echo $i%2?'even':'odd' ?>"> <?php //if($role_name!="Europe") echo $this->getItemHtml($_item) ?> <?php //if($role_name!="Europe") echo $this->getItemExtraInfoHtml($_item) ?> for example I want to show Item Status but not others like Original Price Price,Qty Subtotal and etc I don't know how to write my condition here to make it possible
I know that getItemHtml is comming from abstract.php and is
public function getItemHtml(Varien_Object $item) { if ($item->getOrderItem()) { $type = $item->getOrderItem()->getProductType(); } else { $type = $item->getProductType(); } return $this->getItemRenderer($type) ->setItem($item) ->setCanEditQty($this->canEditQty()) ->toHtml(); }