Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Hide User To View Dashboard Content Rate Topic   - - - - -

 
  • tigerbabba
  • Member
  • Members
  • Join Date: 26-Apr 08
  • 255 posts

Posted 28 August 2014 - 10:45 AM #1


hello .


i wanted to hide dashboard content like sales and everything from specific user id 23515

Where and how do I do that.


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


{if $user_info.user_id != "23515"}

dashboard contents

{/if}

Currently using CS-Cart 4.x
Fortigate Firewalls

 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 18477 posts

Posted 28 August 2014 - 01:24 PM #2

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

http://kb.cs-cart.com/admin-user-group

GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.


 
  • tigerbabba
  • Member
  • Members
  • Join Date: 26-Apr 08
  • 255 posts

Posted 28 August 2014 - 01:42 PM #3

Thanks for your response, thats what I did but it still shows the dashboard stats.
Currently using CS-Cart 4.x
Fortigate Firewalls

 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 18477 posts

Posted 28 August 2014 - 07:26 PM #4

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


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

GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.


 
  • tigerbabba
  • Member
  • Members
  • Join Date: 26-Apr 08
  • 255 posts

Posted 28 August 2014 - 07:55 PM #5

Everything is active no matter what I do , It still shows that dashboard.
Currently using CS-Cart 4.x
Fortigate Firewalls

 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 18477 posts

Posted 29 August 2014 - 07:15 AM #6

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


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.

GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.


 
  • tigerbabba
  • Member
  • Members
  • Join Date: 26-Apr 08
  • 255 posts

Posted 29 August 2014 - 05:36 PM #7

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

I clean cache cc&cctpl

Posted Image
Currently using CS-Cart 4.x
Fortigate Firewalls

 
  • tigerbabba
  • Member
  • Members
  • Join Date: 26-Apr 08
  • 255 posts

Posted 29 August 2014 - 05:38 PM #8

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'}

Currently using CS-Cart 4.x
Fortigate Firewalls

 
  • tigerbabba
  • Member
  • Members
  • Join Date: 26-Apr 08
  • 255 posts

Posted 29 August 2014 - 05:44 PM #9

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 ?
Currently using CS-Cart 4.x
Fortigate Firewalls

 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 18477 posts

Posted 30 August 2014 - 06:57 PM #10

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'}


You should remove the first line:

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

User group type is administrator ?


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

GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.


 
  • alijaved
  • Advanced Member
  • Members
  • Join Date: 14-Apr 18
  • 123 posts

Posted 04 August 2018 - 07:36 AM #11

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



 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 18477 posts

Posted 06 August 2018 - 06:12 AM #12

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


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.


 
  • alijaved
  • Advanced Member
  • Members
  • Join Date: 14-Apr 18
  • 123 posts

Posted 06 August 2018 - 09:30 AM #13

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 



 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 18477 posts

Posted 06 August 2018 - 01:35 PM #14

You can find more information about hooks here

 

https://docs.cs-cart.../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 


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.