2016-06-24 4 views
1

나는 이것에 아주 새롭다, 돕는다.

반복 프로필, 속성, 제조업체 등의 관리 패널에서 사용할 수없는 메뉴를 숨기려고합니다. menu.tpl을 수정하려고했지만 아무 것도 변경하지 않았습니다.Opencart : 관리자 패널에서 메뉴를 숨기는 방법?

경로 :

admin/view/template/common/ *.tpl 

이것은 (프로파일을 되풀이) 내 관리자 패널에 대한 링크입니다 :

admin/index.php?route=catalog/recurring&token=somerandomcharactershere 

사람이 공유시겠습니까 또는 어떤 파일 I 수정해야합니까이? 미리 감사드립니다. 평화.

편집 : 예를 들어
,이,

<ul id="menu"> 
<li id="dashboard"><a href="<?php echo $home; ?>"><i class="fa fa-dashboard fa-fw"></i> <span><?php echo $text_dashboard; ?></span></a></li> 
<li id="catalog"><a class="parent"><i class="fa fa-tags fa-fw"></i> <span><?php echo $text_catalog; ?></span></a> 
<ul> 
    <li><a href="<?php echo $category; ?>"><?php echo $text_category; ?></a> </li> 
    <li><a href="<?php echo $product; ?>"><?php echo $text_product; ?></a></li> 

    <!--<li><a href="<?php echo $recurring; ?>"><?php echo $text_recurring; ?></a></li>--> 

    <li><a href="<?php echo $filter; ?>"><?php echo $text_filter; ?></a></li> 

    <!--<li><a class="parent"><?php echo $text_attribute; ?></a>--> 

    <ul> 
     <!-- 
     <li><a href="<?php echo $attribute; ?>"><?php echo $text_attribute; ?> </a></li> 
     <li><a href="<?php echo $attribute_group; ?>"><?php echo $text_attribute_group; ?></a></li> 
     --> 
    </ul> 


    </li> 
    <!-- 
    <li><a href="<?php echo $option; ?>"><?php echo $text_option; ?></a></li> 
    <li><a href="<?php echo $manufacturer; ?>"><?php echo $text_manufacturer; ?></a></li> 
    <li><a href="<?php echo $download; ?>"><?php echo $text_download; ?></a></li> 
    <li><a href="<?php echo $review; ?>"><?php echo $text_review; ?></a></li> 
    <li><a href="<?php echo $information; ?>"><?php echo $text_information; ?></a></li> 
    --> 

    </ul> 
    </li> 
<li id="extension"><a class="parent"><i class="fa fa-puzzle-piece fa-fw"></i> <span><?php echo $text_extension; ?></span></a> 
    <ul> 
    <li><a href="<?php echo $installer; ?>"><?php echo $text_installer; ?></a></li> 
    <li><a href="<?php echo $modification; ?>"><?php echo $text_modification; ?></a></li> 
    <li><a href="<?php echo $analytics; ?>"><?php echo $text_analytics; ?></a></li> 
    <li><a href="<?php echo $captcha; ?>"><?php echo $text_captcha; ?></a></li> 
    <li><a href="<?php echo $feed; ?>"><?php echo $text_feed; ?></a></li> 
    <li><a href="<?php echo $fraud; ?>"><?php echo $text_fraud; ?></a></li> 
    <li><a href="<?php echo $module; ?>"><?php echo $text_module; ?></a></li> 
    <li><a href="<?php echo $payment; ?>"><?php echo $text_payment; ?></a></li> 
    <li><a href="<?php echo $shipping; ?>"><?php echo $text_shipping; ?></a></li> 
    <li><a href="<?php echo $total; ?>"><?php echo $text_total; ?></a></li> 
    <?php if ($openbay_show_menu == 1) { ?> 
    <li><a class="parent"><?php echo $text_openbay_extension; ?></a> 
     <ul> 
     <li><a href="<?php echo $openbay_link_extension; ?>"><?php echo $text_openbay_dashboard; ?></a></li> 
     <li><a href="<?php echo $openbay_link_orders; ?>"><?php echo $text_openbay_orders; ?></a></li> 
     <li><a href="<?php echo $openbay_link_items; ?>"><?php echo $text_openbay_items; ?></a></li> 
     <?php if ($openbay_markets['ebay'] == 1) { ?> 
     <li><a class="parent"><?php echo $text_openbay_ebay; ?></a> 
     <ul> 
      <li><a href="<?php echo $openbay_link_ebay; ?>"><?php echo $text_openbay_dashboard; ?></a></li> 
      <li><a href="<?php echo $openbay_link_ebay_settings; ?>"><?php echo $text_openbay_settings; ?></a></li> 
      <li><a href="<?php echo $openbay_link_ebay_links; ?>"><?php echo $text_openbay_links; ?></a></li> 
      <li><a href="<?php echo $openbay_link_ebay_orderimport; ?>"><?php echo $text_openbay_order_import; ?></a></li> 
     </ul> 
     </li> 
     <?php } ?> 
     <?php if ($openbay_markets['amazon'] == 1) { ?> 
     <li><a class="parent"><?php echo $text_openbay_amazon; ?></a> 
     <ul> 
      <li><a href="<?php echo $openbay_link_amazon; ?>"><?php echo $text_openbay_dashboard; ?></a></li> 
      <li><a href="<?php echo $openbay_link_amazon_settings; ?>"><?php echo $text_openbay_settings; ?></a></li> 
      <li><a href="<?php echo $openbay_link_amazon_links; ?>"><?php echo $text_openbay_links; ?></a></li> 
     </ul> 
     </li> 
     <?php } ?> 
     <?php if ($openbay_markets['amazonus'] == 1) { ?> 
     <li><a class="parent"><?php echo $text_openbay_amazonus; ?></a> 
     <ul> 
      <li><a href="<?php echo $openbay_link_amazonus; ?>"><?php echo $text_openbay_dashboard; ?></a></li> 
      <li><a href="<?php echo $openbay_link_amazonus_settings; ?>"><?php echo $text_openbay_settings; ?></a></li> 
      <li><a href="<?php echo $openbay_link_amazonus_links; ?>"><?php echo $text_openbay_links; ?></a></li> 
     </ul> 
     </li> 
     <?php } ?> 
     <?php if ($openbay_markets['etsy'] == 1) { ?> 
     <li><a class="parent"><?php echo $text_openbay_etsy; ?></a> 
     <ul> 
      <li><a href="<?php echo $openbay_link_etsy; ?>"><?php echo $text_openbay_dashboard; ?></a></li> 
      <li><a href="<?php echo $openbay_link_etsy_settings; ?>"><?php echo $text_openbay_settings; ?></a></li> 
      <li><a href="<?php echo $openbay_link_etsy_links; ?>"><?php echo $text_openbay_links; ?></a></li> 
     </ul> 
     </li> 
     <?php } ?> 
     </ul> 
     </li> 
     <?php } ?> 
     </ul> 
     </li> 
    <!--<li id="design" style="display:none;"><a class="parent"><i class="fa fa-television fa-fw"></i> <span><?php echo $text_design; ?></span></a> 
    <ul> 
    <li><a href="<?php echo $layout; ?>"><?php echo $text_layout; ?></a></li> 
    <li><a href="<?php echo $banner; ?>"><?php echo $text_banner; ?></a></li> 
    </ul> 
    </li>--> 
    <li id="sale"><a class="parent"><i class="fa fa-shopping-cart fa-fw"></i>  <span><?php echo $text_sale; ?></span></a> 
    <ul> 
    <li><a href="<?php echo $order; ?>"><?php echo $text_order; ?></a></li> 

    <!--<li><a href="<?php echo $order_recurring; ?>"><?php echo $text_order_recurring; ?></a></li>--> 

    <li><a href="<?php echo $return; ?>"><?php echo $text_return; ?></a></li> 
    <li><a class="parent"><?php echo $text_voucher; ?></a> 
    <ul> 
     <li><a href="<?php echo $voucher; ?>"><?php echo $text_voucher; ?></a>   </li> 
     <li><a href="<?php echo $voucher_theme; ?>"><?php echo $text_voucher_theme; ?></a></li> 
     </ul> 
    </li> 
    <li><a class="parent"><?php echo $text_paypal ?></a> 
     <ul> 
     <li><a href="<?php echo $paypal_search ?>"><?php echo $text_paypal_search ?></a></li> 
      </ul> 
       </li> 
       </ul> 
      </li> 
     <li id="customer"><a class="parent"><i class="fa fa-user fa-fw"></i> <span><?php echo $text_customer; ?></span></a> 
      <ul> 
      <li><a href="<?php echo $customer; ?>"><?php echo $text_customer; ?></a></li> 
     <li><a href="<?php echo $customer_group; ?>"><?php echo $text_customer_group; ?></a></li> 
     <li><a href="<?php echo $custom_field; ?>"><?php echo $text_custom_field; ?></a></li> 
      </ul> 
     </li> 
       <li><a class="parent"><i class="fa fa-share-alt fa-fw"></i> <span><?php echo $text_marketing; ?></span></a> 
      <ul> 
      <li><a href="<?php echo $marketing; ?>"><?php echo $text_marketing; ?></a></li> 
     <li><a href="<?php echo $affiliate; ?>"><?php echo $text_affiliate; ?></a></li> 
      <li><a href="<?php echo $coupon; ?>"><?php echo $text_coupon; ?></a></li> 
      <li><a href="<?php echo $contact; ?>"><?php echo $text_contact; ?></a></li> 
      </ul> 
      </li> 
       <li id="system"><a class="parent"><i class="fa fa-cog fa-fw"></i> <span><?php echo $text_system; ?></span></a> 
      <ul> 
      <li><a href="<?php echo $setting; ?>"><?php echo $text_setting; ?></a></li> 
       <li><a class="parent"><?php echo $text_users; ?></a> 
       <ul> 
       <li><a href="<?php echo $user; ?>"><?php echo $text_user; ?></a></li> 
     <li><a href="<?php echo $user_group; ?>"><?php echo $text_user_group; ?></a></li> 
     <li><a href="<?php echo $api; ?>"><?php echo $text_api; ?></a></li> 
    </ul> 
    </li> 
    <li><a class="parent"><?php echo $text_localisation; ?></a> 
    <ul> 
     <li><a href="<?php echo $location; ?>"><?php echo $text_location; ?></a></li> 
     <li><a href="<?php echo $language; ?>"><?php echo $text_language; ?></a></li> 
     <li><a href="<?php echo $currency; ?>"><?php echo $text_currency; ?></a></li> 
     <li><a href="<?php echo $stock_status; ?>"><?php echo $text_stock_status; ?></a></li> 
     <li><a href="<?php echo $order_status; ?>"><?php echo $text_order_status; ?></a></li> 
     <li><a class="parent"><?php echo $text_return; ?></a> 
     <ul> 
      <li><a href="<?php echo $return_status; ?>"><?php echo $text_return_status; ?></a></li> 
      <li><a href="<?php echo $return_action; ?>"><?php echo $text_return_action; ?></a></li> 
      <li><a href="<?php echo $return_reason; ?>"><?php echo $text_return_reason; ?></a></li> 
     </ul> 
     </li> 
     <li><a href="<?php echo $country; ?>"><?php echo $text_country; ?></a></li> 
     <li><a href="<?php echo $zone; ?>"><?php echo $text_zone; ?></a></li> 
     <li><a href="<?php echo $geo_zone; ?>"><?php echo $text_geo_zone; ?></a></li> 
     <li><a class="parent"><?php echo $text_tax; ?></a> 
     <ul> 
      <li><a href="<?php echo $tax_class; ?>"><?php echo $text_tax_class; ?></a></li> 
      <li><a href="<?php echo $tax_rate; ?>"><?php echo $text_tax_rate; ?></a></li> 
     </ul> 
     </li> 
     <li><a href="<?php echo $length_class; ?>"><?php echo $text_length_class; ?></a></li> 
     <li><a href="<?php echo $weight_class; ?>"><?php echo $text_weight_class; ?></a></li> 
    </ul> 
    </li> 
    <li><a class="parent"><?php echo $text_tools; ?></a> 
    <ul> 
     <li><a href="<?php echo $upload; ?>"><?php echo $text_upload; ?></a></li> 
     <li><a href="<?php echo $backup; ?>"><?php echo $text_backup; ?></a></li> 
     <li><a href="<?php echo $error_log; ?>"><?php echo $text_error_log; ?></a></li> 
       </ul> 
      </li> 
      </ul> 
        </li> 
        <li id="reports"><a class="parent"><i class="fa fa-bar-chart-o fa-fw"></i> <span><?php echo $text_reports; ?></span></a> 
         <ul> 
       <li><a class="parent"><?php echo $text_sale; ?></a> 
        <ul> 
        <li><a href="<?php echo $report_sale_order; ?>"><?php echo $text_report_sale_order; ?></a></li> 
       <li><a href="<?php echo $report_sale_tax; ?>"><?php echo $text_report_sale_tax; ?></a></li> 
        <li><a href="<?php echo $report_sale_shipping; ?>"><?php echo $text_report_sale_shipping; ?></a></li> 
        <li><a href="<?php echo $report_sale_return; ?>"><?php echo $text_report_sale_return; ?></a></li> 
         <li><a href="<?php echo $report_sale_coupon; ?>"><?php echo $text_report_sale_coupon; ?></a></li> 
        </ul> 
       </li> 
       <li><a class="parent"><?php echo $text_product; ?></a> 
       <ul> 
        <li><a href="<?php echo $report_product_viewed; ?>"><?php echo $text_report_product_viewed; ?></a></li> 
        <li><a href="<?php echo $report_product_purchased; ?>"><?php echo $text_report_product_purchased; ?></a></li> 
        </ul> 
       </li> 
       <li><a class="parent"><?php echo $text_customer; ?></a> 
    <ul> 
     <li><a href="<?php echo $report_customer_online; ?>"><?php echo $text_report_customer_online; ?></a></li> 
     <li><a href="<?php echo $report_customer_activity; ?>"><?php echo $text_report_customer_activity; ?></a></li> 
     <li><a href="<?php echo $report_customer_order; ?>"><?php echo $text_report_customer_order; ?></a></li> 
     <li><a href="<?php echo $report_customer_reward; ?>"><?php echo $text_report_customer_reward; ?></a></li> 
     <li><a href="<?php echo $report_customer_credit; ?>"><?php echo $text_report_customer_credit; ?></a></li> 
    </ul> 
    </li> 
    <li><a class="parent"><?php echo $text_marketing; ?></a> 
    <ul> 
     <li><a href="<?php echo $report_marketing; ?>"><?php echo $text_marketing; ?></a></li> 
     <li><a href="<?php echo $report_affiliate; ?>"><?php echo $text_report_affiliate; ?></a></li> 
     <li><a href="<?php echo $report_affiliate_activity; ?>"><?php echo $text_report_affiliate_activity; ?></a></li> 
       </ul> 
      </li> 
      </ul> 
       </li> 
        </ul> 
+2

실제 코드를 게시하시기 바랍니다. 파일 경로를 제공하면 도움이되지 않습니다 :) – Confiqure

+0

이미 코드가 주석 처리되었습니다 ... 어떤 링크가 열려 있으면 자동으로 홈 페이지로 리디렉션됩니다 –

+0

그래, 이미 댓글을 달았지만 아직 보여주고 있습니다. 아무 일도 일어나지 않는 것처럼 일합니다. :( –

답변

3

이 반복 프로필 링크를 숨기려면 menu.tpl입니다 관리 메뉴에서, 제조 속성 -

  1. 새 파일을 만듭니다 그 안에 코드 아래에 복사하십시오. 확장 .ocmod.xml이 파일 저장 (예 - hidelinks.ocmod.xml) 확장> 확장 설치에 ​​

    <modification> 
    <name>Remove some links from admin menu</name> 
    <version>1.0</version> 
    <link>test</link> 
    <author>test</author> 
    <code>remove_some_links_menu</code> 
    
    <file path="admin/view/template/common/menu.tpl"> 
    
    <operation> 
    <search><![CDATA[<li><a href="<?php echo $recurring; ?>"><?php echo $text_recurring; ?></a></li>]]></search> 
    <add position="replace"><![CDATA[]]></add> 
    </operation> 
    
    
    <operation> 
    <search><![CDATA[<li><a class="parent"><?php echo $text_attribute; ?></a>]]></search> 
    <add position="replace"><![CDATA[<li style="display:none;"><a class="parent"><?php echo $text_attribute; ?></a>]]></add> 
    </operation> 
    
    
    <operation> 
    <search><![CDATA[<li><a href="<?php echo $manufacturer; ?>"><?php echo $text_manufacturer; ?></a></li>]]></search> 
    <add position="replace"><![CDATA[]]></add> 
    </operation> 
    
    </file> 
    </modification> 
    
  2. 이동, 업로드 버튼 을 클릭하고 위의 저장된 파일을 업로드 할 수 있습니다.

  3. 확장자가 있는지 확인하고 수정 목록에서 사용하도록 설정되어 있는지 확인하십시오. 캐시 새로 고침 (확장> 수정> 캐시 새로 고침).

페이지를 새로 고침하면 3 개의 메뉴 링크 (프로필, 속성, 제조업체)가 모두 사라집니다.

이것은 OpenCart 버전 2.1.x에서 테스트되었습니다.

+0

감사합니다. @Monika. –

관련 문제