2017-06-21 26 views
0

我正在通過opencart教程,當我嘗試上傳修改時,出現以下錯誤:"Modification requires a unique ID code!"。修改有<code>標記。我使用的是opencart 2.3.0.2。上傳ocmod.xml文件時出現「opencart修改需要唯一的ID代碼」

修改的代碼:

<modification> 
<name>Add Header Notification in the catalog and admin pages</name> 
<version>1.0</version>     
<link>http://isenselabs.com</link>     
<author>iSenseLabs</author>                 
<code>new_u_name</code> 
<file path=」admin/view/template/common/header.tpl」> 
    <operation>   
     <search>  
      <![CDATA[<header id=」header」 class=」navbar navbar-static-top」>]]>  
     </search>  
     <add position=」replace」>    
      <![CDATA[     
       <div id=」HeaderNotification」 style=」 background-color: #F54661; z-index- :99999;font-size:22px; 
       text-align:center; color:#fff; position:fixed;width:100%;height: 40px- ;line-height:40px;top:0px;」> 
       Header Notification in Your Admin Panel</div><header id=」header」 class=」navbar navbar-static-top」 style=」margin-top:40px;」>   
       ]]>   
     </add>  
    </operation> 
</file> 
<file path=」catalog/view/theme/*/template/common/header.tpl」>  
    <operation>   
     <search> 
      <![CDATA[</head>]]>   
     </search>   
     <add position=」after」>    
      <![CDATA[     
      <div id=」HeaderNotification」 style=」 background-color: #F54661; z-index:99999;font-size:22px; 
      text-align:center; color:#fff; position:fixed;width:100%;height: 40px;line-height:40px;top:0px;」>Header 
      Notification in Your Store</div><header id=」header」 class=」navbar navbar-static-top」 style=」margin-top:40px;」> 
      ]]> 
     </add>  
    </operation> 
</file> 

回答

0

萬一別人運行到這一點,例如是從書「Opencart的技巧和竅門」,當你複製粘貼代碼你錯了雙引號大約在」after」。重新報價可以解決問題。