Zen Cart Logo
Forums / Built-in Shipping and Payment Modules / Payment based upon shipping option

Payment based upon shipping option

Locked

Views: 1,694

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
16 Aug 2009, 4:52 PM
#1
mrmyles avatar

mrmyles

New Zenner

Join Date:
Jul 2007
Location:
The space between a blink & a tear.
Posts:
18
Plugin Contributions:
0

Payment based upon shipping option

Good Morning Everyone.

I have looked but cannot seem to find an answer for this.

Our site is set up and almost ready to launch. Last thing we want to do is set it up so that available payment options are asigned by the chosen shipping method.

Example:
** - Store Pick up - No CC form to fill out.**
Someone comes to the site, and chooses store pickup, they are shown a screen saying what methods we accept, and can choose one, but do not fill out CC details.

** - Local Delivery - No CC form to fill out.**
Someone comes to the site, and chooses local delivery, they are shown a screen saying what methods we accept, and can choose one, but do not fill out CC details.

** - Shipping - CC form to fill out.**
Someone comes to the site, and chooses shipping, they are shown a screen saying what methods we accept, and can choose one, then must fill out CC details if they chose that method.

Basically, the payment options shown, are designated by the shipping method.

Thanks for any assistance.

Myles

16 Aug 2009, 5:24 PM
#2
ajeh avatar

ajeh

Oba-san

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

Re: Payment based upon shipping option

You would need to customize your payment modules based on the setting of the shipping ...

You can use:
$_SESSION['shipping']['id']

For example, to customize the Credit Card cc payment module:
/includes/modules/payment/cc.php

you can add below this line:

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

To read:

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

    if ($_SESSION['shipping']['id'] == 'storepickup_storepickup') {
      $this->enabled = false;
    }
16 Aug 2009, 9:10 PM
#3
mrmyles avatar

mrmyles

New Zenner

Join Date:
Jul 2007
Location:
The space between a blink & a tear.
Posts:
18
Plugin Contributions:
0

Re: Payment based upon shipping option

You Rock.

Modified three processors to make it just right for what we need, and all done in 15 minutes.

Should have posted sooner as I spent a couple hours looking for the answer, but never would have come up with that.

Thanks!

17 Aug 2009, 4:09 AM
#4
ajeh avatar

ajeh

Oba-san

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

Re: Payment based upon shipping option

Glad that this worked for you ... remember us when you are rich and famous ... :cool: