Page 4 of 5 FirstFirst ... 2345 LastLast
Results 31 to 40 of 48
  1. #31
    Join Date
    Oct 2008
    Posts
    378
    Plugin Contributions
    0

    Default Re: Do not show Nochex option if cart total over £250

    Hi, Thought I ought to post here in my thread as now have a similar problem but in reverse.

    I now need to only show Paypal as a payment method if the order total inc vat and delivery charges is above £2000

    Any clues to the code changes

    Thanks in advance

  2. #32
    Join Date
    Jul 2012
    Posts
    16,732
    Plugin Contributions
    17

    Default Re: Do not show Nochex option if cart total over £250

    Not sure which paypal method to which you refer, but fortunately it doesn't matter... In includes/payment/YOUR_PAYPAL_METHOD.php is a function status_update() that is called when order information has become available. In here you would identify the values that need to be "added" together to identify your minimum "limit" and if that amount is less than your goal, set $this->enabled = false; and provide a notification possibly as to why it is disabled (ie follow programming method(s) already in the file regarding zcLog if that variable is in your version of ZC) but... Still want to be sure that it will be possible for a customer that is to be allowed to make a purchase has an available payment method..
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  3. #33
    Join Date
    Oct 2008
    Posts
    378
    Plugin Contributions
    0

    Default Re: Do not show Nochex option if cart total over £250

    Quote Originally Posted by mc12345678 View Post
    Not sure which paypal method to which you refer, but fortunately it doesn't matter... In includes/payment/YOUR_PAYPAL_METHOD.php is a function status_update() that is called when order information has become available. In here you would identify the values that need to be "added" together to identify your minimum "limit" and if that amount is less than your goal, set $this->enabled = false; and provide a notification possibly as to why it is disabled (ie follow programming method(s) already in the file regarding zcLog if that variable is in your version of ZC) but... Still want to be sure that it will be possible for a customer that is to be allowed to make a purchase has an available payment method..
    Hi would it possible for you to spell this out for me with the appropriate code blocks and files as Ajay did for my other restriction in posts 25 and 26. It is website payments standard

    Thanks

  4. #34
    Join Date
    Jul 2012
    Posts
    16,732
    Plugin Contributions
    17

    Default Re: Do not show Nochex option if cart total over £250

    Sure. Will just "steal" Ajeh's code as I expect/suspect that the session data is still valid since it doesn't look like there was any session removal code provided for that new value:

    Includes/modules/payments/paypal.php

    look for: function update_status()

    And towards the bottom of that section of code

    Before:
    Code:
    if ($check_flag == false) {
     $this->enabled = false;
    }
    Insert:
    Code:
    // bof: disable on orders less than 2000
    if (!IS_ADMIN_FLAG) {
      if ($_SESSION['my_total'] < 2000.00) {
        $this->enabled = false;
      }
    }
    // eof: disable on orders less than 2000
    To look like this in that area:

    Code:
    // bof: disable on orders less than 2000
    if (!IS_ADMIN_FLAG) {
      if ($_SESSION['my_total'] < 2000.00) {
        $this->enabled = false;
      }
    }
    // eof: disable on orders less than 2000
    
    if ($check_flag == false) {
     $this->enabled = false;
    }
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  5. #35
    Join Date
    Oct 2008
    Posts
    378
    Plugin Contributions
    0

    Default Re: Do not show Nochex option if cart total over £250

    Quote Originally Posted by mc12345678 View Post
    Sure. Will just "steal" Ajeh's code as I expect/suspect that the session data is still valid since it doesn't look like there was any session removal code provided for that new value:

    Includes/modules/payments/paypal.php

    look for: function update_status()

    And towards the bottom of that section of code

    Before:
    Code:
    if ($check_flag == false) {
     $this->enabled = false;
    }
    Insert:
    Code:
    // bof: disable on orders less than 2000
    if (!IS_ADMIN_FLAG) {
      if ($_SESSION['my_total'] < 2000.00) {
        $this->enabled = false;
      }
    }
    // eof: disable on orders less than 2000
    To look like this in that area:

    Code:
    // bof: disable on orders less than 2000
    if (!IS_ADMIN_FLAG) {
      if ($_SESSION['my_total'] < 2000.00) {
        $this->enabled = false;
      }
    }
    // eof: disable on orders less than 2000
    
    if ($check_flag == false) {
     $this->enabled = false;
    }
    Many thanks, I will try that in the morning as I have family coming over shortly.

    Will post the results

    Thanks a lot

  6. #36
    Join Date
    Oct 2008
    Posts
    378
    Plugin Contributions
    0

    Default Re: Do not show Nochex option if cart total over £250

    I guess I still have to make the changes that Ajay said in /includes/classes/order_total.php as this is a different site?

  7. #37
    Join Date
    Jul 2012
    Posts
    16,732
    Plugin Contributions
    17

    Default Re: Do not show Nochex option if cart total over £250

    Quote Originally Posted by Congerman View Post
    I guess I still have to make the changes that Ajay said in /includes/classes/order_total.php as this is a different site?
    Just the first change in this post: https://www.zen-cart.com/showthread....78#post1093278
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  8. #38
    Join Date
    Oct 2008
    Posts
    378
    Plugin Contributions
    0

    Default Re: Do not show Nochex option if cart total over £250

    I have made those changes but paypal still appears as an option on low value orders

  9. #39
    Join Date
    Jul 2012
    Posts
    16,732
    Plugin Contributions
    17

    Default Re: Do not show Nochex option if cart total over £250

    Quote Originally Posted by Congerman View Post
    I have made those changes but paypal still appears as an option on low value orders
    Refreshed browser (cleared cache) tried a different browser, logged out, and then back in? And this IS paypal standard not paypal express nor paypal professional? And when saying that paypal still appears this is on the payment processing screen correct?

    Try placing it before the if as in between these two lines of the same function update_status() {

    Code:
    global $order, $db;
    
    // bof: disable on orders less than 2000
    if (!IS_ADMIN_FLAG) {
      if ($_SESSION['my_total'] < 2000.00) {
        $this->enabled = false;
      }
    }
    // eof: disable on orders less than 2000
    
    if ($this->enabled && (int)MODULE_PAYMENT_PAYPAL_ZONE > 0 && isset($order->billing['country']['id'])) {
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  10. #40
    Join Date
    Oct 2008
    Posts
    378
    Plugin Contributions
    0

    Default Re: Do not show Nochex option if cart total over £250

    Quote Originally Posted by mc12345678 View Post
    Refreshed browser (cleared cache) tried a different browser, logged out, and then back in? And this IS paypal standard not paypal express nor paypal professional? And when saying that paypal still appears this is on the payment processing screen correct?

    Try placing it before the if as in between these two lines of the same function update_status() {

    Code:
    global $order, $db;
    
    // bof: disable on orders less than 2000
    if (!IS_ADMIN_FLAG) {
      if ($_SESSION['my_total'] < 2000.00) {
        $this->enabled = false;
      }
    }
    // eof: disable on orders less than 2000
    
    if ($this->enabled && (int)MODULE_PAYMENT_PAYPAL_ZONE > 0 && isset($order->billing['country']['id'])) {
    Looked there and I do not have under global $order, $db;

    if ($this->enabled && (int)MODULE_PAYMENT_PAYPAL_ZONE > 0 && isset($order->billing['country']['id'])) {

    I have

    if ( ($this->enabled == true) && ((int)MODULE_PAYMENT_PAYPAL_ZONE > 0) ) {

 

 
Page 4 of 5 FirstFirst ... 2345 LastLast

Similar Threads

  1. v151 Zen Cart v151 not sending the correct total amount over to Paypal
    By cjcoward in forum PayPal Express Checkout support
    Replies: 5
    Last Post: 5 Jan 2014, 07:15 PM
  2. Free Shipping over $250 restrictions apply
    By EAPerformanceParts in forum Built-in Shipping and Payment Modules
    Replies: 2
    Last Post: 14 Aug 2009, 06:28 PM
  3. PayPal not bringing total over from Zen Cart if currency restrictions exist
    By hardy_girl03 in forum Built-in Shipping and Payment Modules
    Replies: 3
    Last Post: 16 May 2009, 10:10 PM
  4. Flat Rate / Over $250.00 FREE shipping exclude certain items
    By WebSiteGuru in forum Built-in Shipping and Payment Modules
    Replies: 5
    Last Post: 31 Dec 2008, 04:44 AM
  5. Shipping: "Call for Price" if over $250
    By bamaster in forum Built-in Shipping and Payment Modules
    Replies: 0
    Last Post: 12 Jun 2008, 07:03 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