Developer forum

Forum » Ecommerce - Standard features » How can I change payment method in Basket v2 through frontend

How can I change payment method in Basket v2 through frontend

Rasmus Fjord
Reply

 Hey 

 

We want to give the customer the option to select payment method, but how can i achive this ? 

My guess is that I can submit a <form> with a parameter upon through the basketV2 steps, but what parameter and where can i find some info about it ?

 

Anyone who can throw a bone on the subject, btw its a v7 latest version.


Replies

 
Marco Johannesen
Reply
This post has been marked as an answer

 Inside the checkout form, which looks something like this:

 

    <form name="ordersubmit" id="ordersubmit" method="post">
    <input type="hidden" name="<!--@CartV2.NextStepButtonName-->" id="<!--@CartV2.NextStepButtonName-->" value="true"/>

You add the payment loop:

<!--@LoopStart(Paymethods)-->
        <input type="radio" name="EcomCartPaymethodID" data-type="payment"   data-cost="<!--@Ecom:Cart.Paymethod.Price.PriceWithoutVAT-->" id="EcomCartPaymethodID_<!--@Ecom:Cart.Paymethod.ID-->" value="<!--@Ecom:Cart.Paymethod.ID-->" checked="checked" />
    <!--@EndIf(Ecom:Cart.Paymethod.IsSelected)-->
    <!--@If Not Defined(Ecom:Cart.Paymethod.IsSelected)-->
        <input type="radio" name="EcomCartPaymethodID" data-type="payment"  data-cost="<!--@Ecom:Cart.Paymethod.Price.PriceWithoutVAT-->" id="EcomCartPaymethodID_<!--@Ecom:Cart.Paymethod.ID-->" value="<!--@Ecom:Cart.Paymethod.ID-->" />
    <!--@EndIf(Ecom:Cart.Paymethod.IsSelected)-->
<!--@LoopEnd(Paymethods)-->

 

Votes for this answer: 0
 
Janus Lock
Reply

 What he said :)

 
Rasmus Fjord
Reply

 Awesome thx :) 

 

You must be logged in to post in the forum