Results 1 to 8 of 8
  1. #1
    Join Date
    Feb 2010
    Posts
    71
    Plugin Contributions
    0

    Default How can I have different payment options for different shipping options?

    I offer two shipping options Flat rate courier and store pickup.

    and I offer two payment options PayPal and Cash on pickup.

    If a customer selects the flate rate courier option on the 'Delivery Information' page when they progress to 'Payment Information' page they still get the option of 'pay cash on delivery'/pickup.

    How do I change it so that if they select a courier dispatch the 'pay cash on delivery'/pickup option does not show?

    I am using the ZJ Black template

    Many thanks in advance. Once I have this resolved I can go live.

  2. #2
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: How can I have different payment options for different shipping options?

    You would need to customize your Payment Module(s) by disabling the $this->enabled based on the setting:
    $_SESSION['shipping']['id']

    Flat Rate flat shipping module, for example, will give $_SESSION['shipping']['id'] as flat_flat

    The Store Pickup storepickup will give storepickup_storepickup
    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: v1.5.5]
    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!

  3. #3
    Join Date
    Feb 2010
    Posts
    71
    Plugin Contributions
    0

    Default Re: How can I have different payment options for different shipping options?

    Quote Originally Posted by Ajeh View Post
    You would need to customize your Payment Module(s) by disabling the $this->enabled based on the setting:
    $_SESSION['shipping']['id']

    Flat Rate flat shipping module, for example, will give $_SESSION['shipping']['id'] as flat_flat

    The Store Pickup storepickup will give storepickup_storepickup
    Thanks Ajeh, I am a bit of a newbie but have managed to customise a few things here and there already.

    Can you give me a bit more detail on how to do this?

    Many thanks in advance

  4. #4
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: How can I have different payment options for different shipping options?

    What Payment Module are you using for the Cash Payment?
    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: v1.5.5]
    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!

  5. #5
    Join Date
    Feb 2010
    Posts
    71
    Plugin Contributions
    0

    Default Re: How can I have different payment options for different shipping options?

    Quote Originally Posted by Ajeh View Post
    What Payment Module are you using for the Cash Payment?
    I was using one the COD module which I was successful in renaming "Cash on Pick up'

  6. #6
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: How can I have different payment options for different shipping options?

    This would disable the COD Payment Module when the Flat Rate flat Shipping module has been selected by changing the code in:
    /includes/modules/payment/cod.php

    where it reads:
    Code:
          $this->enabled = ((MODULE_PAYMENT_COD_STATUS == 'True') ? true : false);
    to read:
    Code:
          $this->enabled = ((MODULE_PAYMENT_COD_STATUS == 'True') ? true : false);
    
          // do not show COD when shipping is Flat Rate
          if ($_SESSION['shipping']['id'] == 'flat_flat') {
            $this->enabled = false;
          }
    Now if Flat Rate flat shipping module is selected then the COD Payment Module will be disabled and not shown ...
    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: v1.5.5]
    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!

  7. #7
    Join Date
    Feb 2010
    Posts
    71
    Plugin Contributions
    0

    Default Re: How can I have different payment options for different shipping options?

    Quote Originally Posted by Ajeh View Post
    This would disable the COD Payment Module when the Flat Rate flat Shipping module has been selected by changing the code in:
    /includes/modules/payment/cod.php

    where it reads:
    Code:
          $this->enabled = ((MODULE_PAYMENT_COD_STATUS == 'True') ? true : false);
    to read:
    Code:
          $this->enabled = ((MODULE_PAYMENT_COD_STATUS == 'True') ? true : false);
    
          // do not show COD when shipping is Flat Rate
          if ($_SESSION['shipping']['id'] == 'flat_flat') {
            $this->enabled = false;
          }
    Now if Flat Rate flat shipping module is selected then the COD Payment Module will be disabled and not shown ...
    Ajeh, many thanks that worked just perfectly. All I have to do now is test the payment processes, add some more products and go live

    Thank you so much. If you want to take a coffee break have a look at the site www.fastbikegear.co.nz

    I've set all of the stock other than Indicator Reminders to zero until we have finished testing it.

    Critiscms and suggestions valued!

  8. #8
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: How can I have different payment options for different shipping options?

    Thanks for the update that this worked for you ...
    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: v1.5.5]
    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!

 

 

Similar Threads

  1. v138a setting up different shipping options for different products
    By angelbi in forum Built-in Shipping and Payment Modules
    Replies: 0
    Last Post: 7 Jan 2014, 04:55 PM
  2. Different Shipping Options for Different Customer Types
    By scottmcclean in forum Built-in Shipping and Payment Modules
    Replies: 42
    Last Post: 27 Mar 2013, 03:53 PM
  3. Different Payment Options for Different Products
    By thatboynii in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 11 Jun 2010, 02:39 PM
  4. Payment & Shipping Module - need different options for different parts of store
    By obkb in forum Built-in Shipping and Payment Modules
    Replies: 3
    Last Post: 21 Jan 2009, 12:04 PM
  5. Can anyone tell me why I have three different PayPal payment options/buttons
    By shocker in forum PayPal Express Checkout support
    Replies: 5
    Last Post: 15 Jul 2007, 05:18 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR