Hide User To View Dashboard Content

[font=Helvetica][size=3]

hello .[/size][/font]

[font=Helvetica][size=3]

i wanted to hide dashboard content like sales and everything from specific user id 23515[/size][/font][font=Helvetica][size=3]

Where and how do I do that.[/size][/font]

[font=Helvetica][size=3]

Do I've to add the following line in /design/backend/templates/views/index/index.tpl[/size][/font]

[font=Helvetica][size=3]

{if $user_info.user_id != “23515”}[/size][/font][font=Helvetica][size=3]

dashboard contents[/size][/font][font=Helvetica][size=3]

{/if}[/size][/font]

Create a new user group for the administrators, disable all permissions linked with orders and sales reports and assign it to your specific user.



The details can be found here

Thanks for your response, thats what I did but it still shows the dashboard stats.

[quote name='tigerbabba' timestamp='1409233372' post='190957']

Thanks for your response, thats what I did but it still shows the dashboard stats.

[/quote]


  1. Make sure that the new user group is active
  2. Make sure that the new user group is activated for the new administrator
  3. Clear the cache
  4. Log out and log in again using new account

Everything is active no matter what I do , It still shows that dashboard.

[quote name='tigerbabba' timestamp='1409255748' post='190986']

Everything is active no matter what I do , It still shows that dashboard.

[/quote]



I am sorry to hear that. Please address the issue to CS-Cart support team



If you still want to make changes directly in the core files, open the design/backend/templates/views/index/index.tpl file and find the following code:



{assign var="show_latest_orders" value="orders"|fn_check_permissions:'manage':'admin'}
{assign var="show_orders" value="sales_reports"|fn_check_permissions:'reports':'admin'}
{assign var="show_inventory" value="products"|fn_check_permissions:'manage':'admin'}
{assign var="show_users" value="profiles"|fn_check_permissions:'manage':'admin'}




You can add your custom condition to any section, e.g.



{if $auth.user_id != '123'}
{assign var="show_latest_orders" value="orders"|fn_check_permissions:'manage':'admin'}
{/if}




Then clear the cache.



Hope that helps.

Thanks so much for responding. It seems like problem still remain.



I clean cache cc&cctpl



This where I add



{capture name="mainbox"}
{assign var="show_latest_orders" value="orders"|fn_check_permissions:'manage':'admin'}
{assign var="show_orders" value="sales_reports"|fn_check_permissions:'reports':'admin'}
{assign var="show_inventory" value="products"|fn_check_permissions:'manage':'admin'}
{if $auth.user_id != '23515'}
{assign var="show_latest_orders" value="orders"|fn_check_permissions:'manage':'admin'}
{/if}
{assign var="show_users" value="profiles"|fn_check_permissions:'manage':'admin'}

My User group only the following privileges checked



Manage Pages View Pages in CMS

Manage Catalog View Catalog in CATALOG



User group type is administrator ?

[quote name='tigerbabba' timestamp='1409333904' post='191060']

This where I add



{capture name="mainbox"}
{assign var="show_latest_orders" value="orders"|fn_check_permissions:'manage':'admin'}
{assign var="show_orders" value="sales_reports"|fn_check_permissions:'reports':'admin'}
{assign var="show_inventory" value="products"|fn_check_permissions:'manage':'admin'}
{if $auth.user_id != '23515'}
{assign var="show_latest_orders" value="orders"|fn_check_permissions:'manage':'admin'}
{/if}
{assign var="show_users" value="profiles"|fn_check_permissions:'manage':'admin'}


[/quote]



You should remove the first line:



{assign var="show_orders" value="sales_reports"|fn_check_permissions:'reports':'admin'}



[quote name='tigerbabba' timestamp='1409334284' post='191061']

User group type is administrator ?

[/quote]



Yes, it should also be activated for the new administrator. Make sure that on the “update administrator profile page” the status of your user group is active, not available

Dear Ecomlabs, can you please tell me how can I hide the Gross total and total paid on "View orders" page? I do not want my administrators to see how many sales I am going at the same time I Want them to manage the orders also, I just want to hide Gross total and total paid shown at the bottom of the view order, I want to hide for specific admins

For example, you can use orders:statistic_list hook in the design/backend/templates/views/orders/manage.tpl file to hide this information for specific administrators

For example, you can use orders:statistic_list hook in the design/backend/templates/views/orders/manage.tpl file to hide this information for specific administrators

Can you please explain how can I do this?

For example, I have an administrator with privileges to view/edit/change order status e.t.c I want to hide gross total and total paid from view order page for this administrator for example (admin@test.com)

How could I use the hooks? could you please explain me

You can find more information about hooks here

https://docs.cs-cart.com/4.8.x/developer_guide/addons/hooking/tpl_hooks.html

For example, data can be hidden for specific user IDs

{if $auth.user_id != 123}
  ... show total paid amount here...
{/if}

where 123 - is the ID of administrator

You can find more information about hooks here

https://docs.cs-cart.com/4.8.x/developer_guide/addons/hooking/tpl_hooks.html

For example, data can be hidden for specific user IDs

{if $auth.user_id != 123}
  ... show total paid amount here...
{/if}

where 123 - is the ID of administrator

That's very helpful. I was looking for this solution long time :)

but what should I put between the IF's ?

I am also looking to hide the total from all admins except super admin

That's very helpful. I was looking for this solution long time :)

but what should I put between the IF's ?

I am also looking to hide the total from all admins except super admin

Just find this content in the corresponding template and wrap it with my code