Forums / Built-in Shipping and Payment Modules / Limit payment methods as function of the total buying price

Limit payment methods as function of the total buying price

Locked

Views: 1,224

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
11 Sep 2008, 3:28 PM
#1
sanji avatar

sanji

Zen Follower

Join Date:
Jan 2005
Posts:
138
Plugin Contributions:
0

Limit payment methods as function of the total buying price

Would it be possible to limit some payment methods to customers that buy for more than a certain amount of merchandises? I typically do not want my customers to pay by bank transfer if the total of their cart is less than 20$...

Is that possible in ZC, or is their an easy way to code it?

Thanks for your help,

sanji

11 Sep 2008, 3:44 PM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Limit payment methods as function of the total buying price

In the Payment modules, the $this->enabled controls the display of the module, as in showing or not showing ...

Example: in the moneyorder.php payment module you will see:

      $this->enabled = ((MODULE_PAYMENT_MONEYORDER_STATUS == 'True') ? true : false);

If you were to add below that:

    if (IS_ADMIN_FLAG == true || $_SESSION['cart']->show_total() >= 20) {
      $this->enabled = true;
    } else {
      $this->enabled = false;
    }

and then that will show Checks/Money Orders when the order total is greater than $20.00 and hide it or mask it when the orders total is less ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

12 Sep 2008, 9:37 PM
#3
sanji avatar

sanji

Zen Follower

Join Date:
Jan 2005
Posts:
138
Plugin Contributions:
0

Re: Limit payment methods as function of the total buying price

Thanks a lot Ajeh for this comprehensive answer.

This is working really fine, and it is so easy to implement!

Great support, as always.

sanji

13 Sep 2008, 5:36 AM
#4
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Limit payment methods as function of the total buying price

Thanks for the update that this was able to manage your modules for you with additional conditions ... :smile:

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!