Skip to content

Instantly share code, notes, and snippets.

@bheyde
Last active September 15, 2016 16:38
Show Gist options
  • Save bheyde/2f15181796fce0a6c6bd1d37203c1340 to your computer and use it in GitHub Desktop.
Save bheyde/2f15181796fce0a6c6bd1d37203c1340 to your computer and use it in GitHub Desktop.
<select name="AdditionalPaymentMethod">
<mvt:foreach array="paymentmethods" iterator="method">
<mvt:if expr="( l.settings:method:module NE 'customercredit' ) OR
( ( g.PaymentMethod NE 'customercredit:credit' ) AND
( NOT miva_array_search( l.settings:splitpayment:splits, 1, l.split, 'l.split:module:code EQ l.settings:method:module' ) ) )">
<mvt:if expr="l.settings:method:paymentcard:id">
<option value="paymentcard:&mvte:method:paymentcard:id;">&mvt:method:name;</option>
<mvt:elseif expr="l.settings:method:paymentcardtype:id">
<option value="paymentcardtype:&mvte:method:paymentcardtype:id;">&mvt:method:name;</option>
<mvt:else>
<option value="&mvte:method:module;:&mvte:method:code;">&mvt:method:name;</option>
</mvt:if>
</mvt:if>
</mvt:foreach>
</select>
<div class="continue-button">
<mvt:if expr="l.settings:paymentsettings:mivapay:enabled AND ( l.settings:mivapay:paymentcardtype:id OR l.settings:mivapay:paymentcard:id )">
<script type="text/javascript">
var onclick_submit = function( event )
{
if ( MivaPay && ( typeof MivaPay.Submit === 'function' ) )
{
MivaPay.Submit( function()
{
var form;
form = document.getElementById( 'opay_form' );
form.submit();
} );
}
}
</script>
<span onclick="onclick_submit(); return false;">
<mvt:item name="buttons" param="Continue" />
</span>
<mvt:else>
<mvt:item name="buttons" param="Continue" />
</mvt:if>
</div>
<div id="payment-fields">
<mvt:if expr="l.settings:paymentsettings:mivapay:enabled AND ( l.settings:mivapay:paymentcardtype:id OR l.settings:mivapay:paymentcard:id )">
<mvt:item name="mivapay" />
<mvt:else>
<mvt:foreach array="payment:fields" iterator="field">
<div class="form_row">
<mvt:if expr="l.settings:field:invalid">
<label class="bold red">&mvt:field:prompt;</label>
<mvt:else>
<label class="bold">&mvt:field:prompt;</label>
</mvt:if>
<mvt:item name="payment" param="field:code" />
</div>
</mvt:foreach>
</mvt:if>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment