Developer forum

Forum » Ecommerce - Standard features » Skipping payment/completing order with zero or negative value

Skipping payment/completing order with zero or negative value

Thomas Nielsen
Reply

Hi guys,

 

Just wanted to share a way to complete an order with a price/value of 0 or less.

 

Simply create two payment methods

1) handles normal payments via Quickpay or other

2) blank payment method, that handles orders that does not need to be payed

 

In the information template, i replaced the normal loop for payment methods with a hardcoded version, that selects the appropriate payment method based on the value of the order.

 

<!--@If(Ecom:Order.Price.PricePIP>0)-->
<input name="EcomCartPaymethodID" id="EcomCartPaymethodID_PAY2" value="PAY2" checked="checked" type="radio"><label for="EcomCartPaymethodID_PAY2">Normal payment</label><br />
<!--@EndIf-->
<!--@If(Ecom:Order.Price.PricePIP<=0)-->
<input name="EcomCartPaymethodID" id="EcomCartPaymethodID_PAY3" value="PAY3" checked="checked" type="radio"><label for="EcomCartPaymethodID_PAY3">Skip payment</label>
<!--@EndIf-->
 

Hope it helps someone - maybe myself in the future when i forget how i do this ;-)


Replies

 
Nicolai Høeg Pedersen
Reply

Hi Thomas

 

Thanks for sharing!

 

BR Nicolai

 

You must be logged in to post in the forum