Page 1 of 2 12 LastLast
Results 1 to 10 of 16
  1. #1
    Join Date
    Jun 2009
    Posts
    66
    Plugin Contributions
    0

    Default limited payment methods only with one categories

    is it possible to limit payment methods (only credit card) on one category or a group of ten products?
    now you can pay the items with credit card, cash or paypal.

    How?

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

    Default Re: limited payment methods only with one categories

    You can do this by controlling the $this->enabled in any of the modules ...

    When set to false, the module will not show ... when set to true, the module will show ...
    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
    Jun 2009
    Posts
    66
    Plugin Contributions
    0

    Default Re: limited payment methods only with one categories

    for example if i want paypal disabled for master category 103 , what have I do?

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

    Default Re: limited payment methods only with one categories

    In PayPal IPN, paypal.php, you can change this function:
    Code:
      function update_status() {
        global $order, $db;
    
        if ( ($this->enabled == true) && ((int)MODULE_PAYMENT_PAYPAL_ZONE > 0) ) {
          $check_flag = false;
          $check_query = $db->Execute("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_PAYMENT_PAYPAL_ZONE . "' and zone_country_id = '" . $order->billing['country']['id'] . "' order by zone_id");
          while (!$check_query->EOF) {
            if ($check_query->fields['zone_id'] < 1) {
              $check_flag = true;
              break;
            } elseif ($check_query->fields['zone_id'] == $order->billing['zone_id']) {
              $check_flag = true;
              break;
            }
            $check_query->MoveNext();
          }
    
          if ($check_flag == false) {
            $this->enabled = false;
          }
        }
      }
    to read:
    Code:
      function update_status() {
        global $order, $db;
    
        if ( ($this->enabled == true) && ((int)MODULE_PAYMENT_PAYPAL_ZONE > 0) ) {
          $check_flag = false;
          $check_query = $db->Execute("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_PAYMENT_PAYPAL_ZONE . "' and zone_country_id = '" . $order->billing['country']['id'] . "' order by zone_id");
          while (!$check_query->EOF) {
            if ($check_query->fields['zone_id'] < 1) {
              $check_flag = true;
              break;
            } elseif ($check_query->fields['zone_id'] == $order->billing['zone_id']) {
              $check_flag = true;
              break;
            }
            $check_query->MoveNext();
          }
    
          if ($check_flag == false) {
            $this->enabled = false;
          }
        }
    
        global $cart;
        if ($_SESSION['cart']->in_cart_check('master_categories_id','103') > 0) {
            $this->enabled = false;
        }
    
      }
    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
    Jun 2009
    Posts
    66
    Plugin Contributions
    0

    Default Re: limited payment methods only with one categories

    thank you very much! it works but '103' is a sub category! Now I would like that it works with category '100' that includes sub-categories 103 104 105. If I change '103' into '100' doesn't operate.
    thank you for helping me!

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

    Default Re: limited payment methods only with one categories

    You would need to include each specific master_categories_id for this method to work ...
    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
    Mar 2009
    Location
    Serbia
    Posts
    349
    Plugin Contributions
    0

    Default Re: limited payment methods only with one categories

    Hi,
    I want to have 2 categori of product.
    When customer order product in 1 categori hi get page for pay.
    Byt when order product from 1 end 2 categori I want to forbit to get page for paying.

    Becouse some product can't send to customer tugeder with anader product.

    www.kavanali.com

  8. #8
    Join Date
    Mar 2009
    Location
    Serbia
    Posts
    349
    Plugin Contributions
    0

    Default Product who can't order tugeder, hay to do thet?

    I want to have 2 categori of product.
    When customer order product in 1 categori hi get page for pay.
    Byt when order product from 1 end 2 categori I want to forbit to get page for paying.

    Becouse some product can't send to customer tugeder with anader product.

    www.kavanali.com

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

    Default Re: limited payment methods only with one categories

    You could change the code to read:
    Code:
      function update_status() {
        global $order, $db;
    
        if ( ($this->enabled == true) && ((int)MODULE_PAYMENT_PAYPAL_ZONE > 0) ) {
          $check_flag = false;
          $check_query = $db->Execute("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_PAYMENT_PAYPAL_ZONE . "' and zone_country_id = '" . $order->billing['country']['id'] . "' order by zone_id");
          while (!$check_query->EOF) {
            if ($check_query->fields['zone_id'] < 1) {
              $check_flag = true;
              break;
            } elseif ($check_query->fields['zone_id'] == $order->billing['zone_id']) {
              $check_flag = true;
              break;
            }
            $check_query->MoveNext();
          }
    
          if ($check_flag == false) {
            $this->enabled = false;
          }
        }
    
        global $cart;
        if ($_SESSION['cart']->in_cart_check('master_categories_id','103') > 0 && $_SESSION['cart']->in_cart_check('master_categories_id','105') {
            $this->enabled = false;
        }
    
      }
    Where the categories_id for 103 and 105 are the master_categories_id for these products that cannot sell together ...
    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!

  10. #10
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Product who can't order tugeder, hay to do thet?

    What is the basic problem? Can the products just not be shipped together? Or is there another reason they can't be ordered together? If they are going to be shipped to the same location by different carriers or from different sources, you can set payment/shipping methods to account for the cost of two shipments.
    We need more details to be able to give the best advice.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Restricting payment methods to only certain categories
    By delia in forum General Questions
    Replies: 6
    Last Post: 30 Dec 2014, 06:53 PM
  2. limitlimited shipped methods only with one categories
    By kobra8 in forum Managing Customers and Orders
    Replies: 29
    Last Post: 17 Oct 2009, 01:19 AM
  3. Ultimate SEO URLs Does Not Work with Categories with Only One Product
    By hossbronco in forum All Other Contributions/Addons
    Replies: 5
    Last Post: 17 Oct 2008, 04:03 AM
  4. Downloadable & tangible products in one order with various payment methods
    By mcihelka in forum Managing Customers and Orders
    Replies: 2
    Last Post: 24 May 2007, 06:22 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