1

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(); } 

1 Answer 1

1

It was app/design/adminhtml/default/default/template/sales/order/view/items/renderer/default.phtml

I wrote my condition there and now I have two different level access for showing the elements of the order table.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.