Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2008
    Posts
    8
    Plugin Contributions
    0

    Default Only show payment method when UPS shipping method chosen?

    I'm trying to figure out how to limit the payment methods shown depending on the shipping method chosen at checkout (step 1), but I can't figure out what's wrong.


    After scouring the boards, it seems like this should be correct.. but the payment methods still shows up in checkout regardless of the shipping method I chose.

    ex: cc.php line 56

    PHP Code:
         //  Only allow orders when ship by upsxml
    if ($_SESSION['shipping']['title'] = 'upsxml')     { 
    $this->enabled = ((MODULE_PAYMENT_CC_STATUS == 'True') ? true false);


    I tried switching upsxml with upsxml_upsxml and Flat Rate, but no change.


    Any ideas?

  2. #2
    Join Date
    Jan 2004
    Posts
    66,350
    Blog Entries
    7
    Plugin Contributions
    271

    Default Re: Only show payment method when UPS shipping method chosen?

    Have you tried just $_SESSION['shipping']['id'] instead of ['title'] to it?

    example using the ups.php shipping module:
    $_SESSION['shipping']['title'] = United Parcel Service (1 x 11.10lbs) (3 Day Select)
    $_SESSION['shipping']['id'] = ups_3DS

    Also, if a module is turned off (ie: disabled or uninstalled) then it won't even be triggered for evaluation. You're better to have it enabled, and then have the code disable it if it doesn't apply.
    Last edited by Ajeh; 28 Aug 2008 at 04:17 PM. Reason: tidying
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

 

 

Similar Threads

  1. v151 Disable a payment method for a chosen shipping method?
    By chowyungunz in forum Built-in Shipping and Payment Modules
    Replies: 7
    Last Post: 12 Jun 2015, 12:56 PM
  2. Show Payment Method ONLY if Previous purchase
    By ehdesign in forum Built-in Shipping and Payment Modules
    Replies: 0
    Last Post: 26 Sep 2014, 02:25 AM
  3. 1.50beta Missing pmt id when only one payment method
    By torvista in forum Bug Reports
    Replies: 0
    Last Post: 23 Aug 2011, 11:12 PM
  4. Replies: 8
    Last Post: 26 Aug 2010, 12:40 AM
  5. Replies: 0
    Last Post: 10 Nov 2009, 06:54 PM

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