Page 2 of 2 FirstFirst 12
Results 11 to 13 of 13
  1. #11
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: How do I make Invoice-Only Customers not see PayPal as a payment choice?

    I've not tested this, because I no longer have a 1.3.9 test site handy. (Shameless plug encouraging you to upgrade to a current version ;) )

    paypaldp.php file (payments pro)
    Code:
          if ($order_amount > 10000) $this->enabled = false;
        }
          // disable for invoice-only customers
          $group_query = $db->Execute("select customers_group_pricing from " . TABLE_CUSTOMERS . " where customers_id = '" . (int)$_SESSION['customer_id'] . "'");
          if ($this->enabled == true) {
            $check_flag_group = false;
            $check = $db->Execute("select group_name from " . TABLE_GROUP_PRICING . " where group_id = '" . $group_query->fields['customers_group_pricing'] . "'");
            if ($check->RecordCount() ==  1) {
              $invoice_prefix = "invoice";
              $check_prefix = substr($check->fields['group_name'], 0, strlen($invoice_prefix));
              if (strcasecmp($check_prefix, $invoice_prefix) == 0) {
                $check_flag_group = true;
              }
            }
            if ($check_flag_group == true) {
              $this->enabled = false;
            }
          }
      }
    .

    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.

  2. #12
    Join Date
    Mar 2009
    Location
    Trowbridge, Wiltshire
    Posts
    121
    Plugin Contributions
    0

    Default Re: How do I make Invoice-Only Customers not see PayPal as a payment choice?

    Hi there,
    I have re-stepped through the lines of code and they match. I am not sure what to do now. Is there anything else I can try to make this work? Could I add something similar to the checkout_payment.php file as well?

    Any help greatly appreciated.

  3. #13
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: How do I make Invoice-Only Customers not see PayPal as a payment choice?

    No, there are no other changes to make.
    I just put up a new 1.3.9h site, added a discount-group named "invoice", created a customer and added them to that group, and added the code change exactly as I posted above, and it works just fine (prevents the Pro fields for credit-cards from appearing during checkout, since the customer is invoice-only). Also tested with the group being named "invoice-only" and "Invoice-Only", and it operates correctly either way. Also tested taking the customer out of that group, and the CC fields show up correctly as expected.
    .

    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.

 

 
Page 2 of 2 FirstFirst 12

Similar Threads

  1. Replies: 1
    Last Post: 10 Aug 2011, 02:07 AM
  2. Replies: 2
    Last Post: 5 May 2010, 11:23 AM
  3. Replies: 1
    Last Post: 14 May 2008, 06:26 PM
  4. How to make specific items visible only to special customers?
    By darthjones in forum General Questions
    Replies: 10
    Last Post: 4 Aug 2006, 10:22 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