Post by ultanocallaghan » Wed Apr 16, 2014 7:23 pm

Hi there,

I want to set up my site so that for PayPal, instead of having a minimum order total before the payment method becomes active, have it so that no orders can be placed when the value of the cart is greater than £50 or so.

Could anyone be so kind as to let me know how to do this?

King Regards,
Ultan.

New member

Posts

Joined
Fri Mar 14, 2014 6:42 pm

Post by Johnathan » Wed Apr 16, 2014 9:53 pm

You can use Restrict Payment Methods to do this, if you want to avoid editing files yourself, and have something with some more flexibility. Otherwise, if you want to try hard-coding it, you can try an edit like this:

Code: Select all

IN:
/catalog/model/payment/pp_standard.php

AFTER:
public function getMethod($address, $total) {

ADD:
if ($this->cart->getSubTotal() > 50) return array(); 
It should work the same for any other payment method file in that directory.

Image
Image Image Image Image


User avatar
Global Moderator

Posts

Joined
Fri Dec 18, 2009 3:08 am


Post by ultanocallaghan » Wed Apr 16, 2014 10:28 pm

Worked a treat perfectly.

New member

Posts

Joined
Fri Mar 14, 2014 6:42 pm
Who is online

Users browsing this forum: No registered users and 14 guests