2016-12-14 53 views
0

我想添加js文件以及自定義模塊。添加它後,我的module.Payment方法的佈局文件停止工作。可以有人告訴我什麼是問題。 這裏是代碼 - custom_layout.xml用magento中的自定義模塊添加js文件後,結帳頁面不工作

 <?xml version="1.0"?> 
    <layout version="0.1.0"> 
    <default> 
    <reference name="head"> 
    <action method="addJs"><script>custom_module/crypto.js</script> 
    </action> 
    </reference> 
    </default> 
    </layout> 

config.xml中

<frontend> 
    <layout> 
    <updates> 
    <ideal> 
    <file>custom_layout.xml</file> 
     </ideal> 
    </updates> 
    </layout> 
    </frontend> 

之後加入加密JS,它是在頭可用,但結帳頁面是不是working.here是screenshots- screenshot of console

screenshot of non clickable checkout page

回答

1

我認爲它conflic t問題,所以你可以添加一組js像

<action method="addItem"> 
<type>js</type><name>custom_module/crypto.js</name> 
<group>cust_js</group> 
</action> 

嘗試添加如上所述的js。這將解決衝突問題,希望其幫助:)