進行状況セクションの最初の出力は PHP ベースですが、Magento は、ステップからステップへと移動するにつれて、AJAX を介してページの進行状況セクションを更新します。これは、次のコードによって処理されます
#File: skin/frontend/base/default/js/opcheckout.js
reloadProgressBlock: function(toStep) {
var updater = new Ajax.Updater('checkout-progress-wrapper', this.progressUrl, {
method: 'get',
onFailure: this.ajaxFailure.bind(this),
parameters: toStep ? {toStep: toStep} : null
});
},
Ajax.Updaterのドキュメントを確認すると、Magento が渡さない追加のオプションがあることがわかります。
evalScripts (ブール値、デフォルトは false): 応答テキスト内の要素を評価する必要があるかどうか。
これは、Magento が Ajax を介してページのそのセクションを更新するときにスクリプトが評価されないことを意味し、説明した動作が見られる最も可能性の高い理由です。
あなたの問題を解決するために、このコードをprogress.phtml
テンプレートに追加することをスキップし、代わりに次のレイアウトの更新を使用します (local.xml
または、それがあなたのスタイルである場合は別の場所で)
<layouts>
<checkout_onepage_index>
<reference name="right">
<block type="core/text" name="my_extra_stuff" before="checkout.progress.wrapper">
<action method="setText"><text><![CDATA[
<span id="siteseal"><script type="text/javascript" src="https://seal.godaddy.com/getSeal?sealID=xxx"></script></span>
]]></text></action>
</block>
</reference>
</checkout_onepage_index>
</layouts>
進行状況の下にコードが必要な場合はbefore="checkout.progress.wrapper"
、レイアウト更新 xml から削除するだけです。