Skip to content

Instantly share code, notes, and snippets.

@kulamochi
Last active August 29, 2015 14:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kulamochi/be617fe03beb1a55c309 to your computer and use it in GitHub Desktop.
Save kulamochi/be617fe03beb1a55c309 to your computer and use it in GitHub Desktop.
[EC-CUBE 2.13] Payment - selected radio button
<input type="radio" id="pay_<!--{$smarty.section.cnt.iteration}-->" name="<!--{$key}-->" value="<!--{$arrPayment[cnt].payment_id}-->" style="<!--{$arrErr[$key]|sfGetErrorColor}-->" <!--{$arrPayment[cnt].payment_id|sfGetChecked:$arrForm[$key].value}--> <!--{if !$arrPayment[cnt].payment_id|sfGetChecked:$arrForm[$key].value && $smarty.section.cnt.first}-->checked="checked"<!--{/if}--> />
@kulamochi
Copy link
Author

https://github.com/EC-CUBE/eccube-2_13/blob/master/data/Smarty/templates/default/shopping/payment.tpl#L184

「支払い方法」を選択せずに登録できてしまうので既存のコードに以下のSmartyコードを追加し、初期値を設定する。

checked="checked"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment