Page 1 of 1

Skipping Payment Option During Checkout

Posted: Sun Jun 17, 2012 5:17 am
by moustafa
Hi,

We want to offer the ability to have wholesale customers (those who order above a certain dollar value) check out without entering payment information, firstly b/c they typically pay via wire xfer and secondly b/c we offer manual discounts on certain items that can't be easily reflected in AC's pricing system, even using volume discounts.

So we added a coupon that offers 100% off whenever the order value is above the given threshold, but it still requires payment information to be entered. Ideally, we would have a payment method that was specific to order values above that threshold. (We don't know who our wholesale customers will be beforehand, so we can't create a group for them either.) I guess we could create a gift certificate voucher with some astronomical amount associated with it and have people use that.

Thoughts?

Moustafa

Re: Skipping Payment Option During Checkout

Posted: Mon Jun 18, 2012 8:59 am
by david-ebt
Could you use the Check or Phone Call or Purchase Order payment for these users? If one of those forms would work (or a modified version), you can update the ConLib\OnePageCheckout.aspx.cx to only display that payment form if the order is above a certain total. Here is the default code for adding in the check payment option in the OnePageCheckout.aspx.cx in the BindPaymentForms function:

Code: Select all

case PaymentInstrument.Check:
	paymentMethods.Add(new DictionaryEntry(method.PaymentMethodId, method.Name));
	break;
Suppose you wanted to use the Check payment option and a wholesale customer was defined as someone whose order totaled at least $5,000. First turn on the Check Payment as a valid payment method. Then modify the above code to:

Code: Select all

case PaymentInstrument.Check:
	if (orderTotal >= 5000)
		paymentMethods.Add(new DictionaryEntry(method.PaymentMethodId, method.Name));
	break;
Now the check option would only show for large orders.

You would need to make a similar change to Conlib\PaymentPage.ascx.cx for users who go through the multiple page checkout process.

I hope that helps or at least provides you some ideas.

Re: Skipping Payment Option During Checkout

Posted: Wed Jun 20, 2012 3:22 am
by moustafa
Great, thanks for the idea!

Re: Skipping Payment Option During Checkout

Posted: Wed Jun 20, 2012 4:38 am
by moustafa
BTW, this worked like a charm.

In AC, it's possible to change the display name of the payment method, so instead of "Phone", I called it "Wholesale". I just needed to change one bit of text in /Checkout/PaymentForms/PhoneCallPaymentForm.ascx to fix the display message during checkout.

Thanks again.

Moustafa

Re: Skipping Payment Option During Checkout

Posted: Wed Jun 27, 2012 3:18 pm
by moustafa
There's one more fix that needs to be made to ConLib/PaymentPage.ascx.cs.

The code should look like this:

Code: Select all

case PaymentInstrument.PhoneCall:
  LSDecimal orderTotal = GetBasketTotal();            
  if (orderTotal >= 5000) {
    ASP.PhoneCallPaymentForm phoneCallForm = new ASP.PhoneCallPaymentForm();
    phoneCallForm.PaymentMethodId = method.PaymentMethodId;
    phPaymentForms.Controls.Add(phoneCallForm);
  }
  break;