Results 1 to 9 of 9
  1. #1
    Join Date
    Feb 2006
    Posts
    124
    Plugin Contributions
    0

    Default Shipping and Payment

    Can i do this?

    When a costumer select a type of Shipping plan (for example A) have to mandatory a type of Payment.


    For example

    Shipping :

    A
    B
    C

    Payment:

    X
    Y
    Z


    When i select A (Shipping) i have to select Y (Payment)


    Can i do this?

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

    Default Re: Shipping and Payment

    This type of feature can be designed for your shop ... it is not, however, built into Zen Cart ...

    What you would want to control is the $this->enabled on the Payment Modules to change based on the Shipping Module selected ...
    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!

  3. #3
    Join Date
    Feb 2006
    Posts
    124
    Plugin Contributions
    0

    Default Re: Shipping and Payment

    yes it this.

    Any ideia, how to do it?

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

    Default Re: Shipping and Payment

    Make a function that decides based on the selected Shipping Module when to set the $this->enabled to false in the Payment Module ...

    If false, then the Payment Module will not display ...
    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!

  5. #5
    Join Date
    Feb 2006
    Posts
    124
    Plugin Contributions
    0

    Default Re: Shipping and Payment

    In what page and line can i do this?

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

    Default Re: Shipping and Payment

    All of the Payment Modules have a line similar to:
    PHP Code:
          $this->enabled = ((MODULE_PAYMENT_MONEYORDER_STATUS == 'True') ? true false); 
    What you need is a function to control the $this->enabled beyond the simple test of is it installed ...

    Writing a function to test the conditions of what the Shipping Module is that the customer has selected and set that value to false to turn off a Payment Module when it should not show ...

    The Shipping Modules use something similar to control when the Free Shipping freeshipper should show or not show and whether the other Shipping Modules should show or not show ...

    For example the Item Rate item Shipping Modules uses:
    PHP Code:
          // disable only when entire cart is free shipping
          
    if (zen_get_shipping_enabled($this->code)) {
            
    $this->enabled = ((MODULE_SHIPPING_ITEM_STATUS == 'True') ? true false);
          } 
    If the function returns a false value, then the Item Rate item Shipping Module will turn off or hide from display ...

    If the function returns a true value, then the Item Rate item Shipping Module will turn on or show on the display ...
    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!

  7. #7
    Join Date
    Feb 2006
    Posts
    124
    Plugin Contributions
    0

    Default Re: Shipping and Payment

    I will try, but i don't know if i can do it

  8. #8
    Join Date
    Feb 2006
    Posts
    124
    Plugin Contributions
    0

    Default Re: Shipping and Payment

    Could u help me?

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

    Default Re: Shipping and Payment

    $_SESSION['payment'] will tell you the payment such as: moneyorder

    $_SESSION['shipping']['id'] will come up as: item_item or flat_flat

    NOTE: UPS will show the module and type: ups_3DS
    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!

 

 

Similar Threads

  1. Disabling shipping and payment
    By Yanik in forum Basic Configuration
    Replies: 4
    Last Post: 11 Jan 2011, 03:14 PM
  2. Payment and shipping?
    By coolman in forum General Questions
    Replies: 4
    Last Post: 1 Oct 2008, 03:25 AM
  3. Payment and Shipping Problem.
    By status in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 28 Jan 2008, 07:36 AM
  4. No payment and shipping
    By blakefrance in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 4 Aug 2007, 10:27 PM
  5. Shipping and Payment Module
    By Nikx in forum Customization from the Admin
    Replies: 1
    Last Post: 18 Nov 2006, 08:45 AM

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