Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2009
    Posts
    7
    Plugin Contributions
    0

    Default Payment modules linked to products

    Hi, i have been searching both this forum and google to see if there is any way of assigning, or rather remove, a certain payment method to a product.

    I use, amongst other modules, the COD module for payment, but for certain products in my shop i do not want this payment method to be valid.

    Is it possible to "unassign", or block, a payment method from a product, or product group perhaps, in any reasonably easy way.

    Thanks for your help !

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

    Default Re: Payment modules linked to products

    You could customize the COD payment module with something like:
    Code:
          if ((int)MODULE_PAYMENT_COD_ORDER_STATUS_ID > 0) {
            $this->order_status = MODULE_PAYMENT_COD_ORDER_STATUS_ID;
          }
    
    // bof: do not show if products_id 1, 2, 6 or 10 are in the cart
          if (!IS_ADMIN_FLAG) {
            global $cart;
            $chk_products_in_cart = $_SESSION['cart']->get_product_id_list();
            $chk_products = '1, 2, 6, 10';
            $arr1 = explode(", ", $chk_products);
            $arr2 = explode(", ", $chk_products_in_cart);
            $donotshow = array_intersect($arr1, $arr2);
    
            if ((int)$donotshow) {
              $this->enabled = false;
            }
          }
    // eof: do not show if products_id 1, 2, 6 or 10 are in the cart
    
          if (is_object($order)) $this->update_status();
    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: v1.5.5]
    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
    Aug 2009
    Posts
    7
    Plugin Contributions
    0

    Default Re: Payment modules linked to products

    I previously solved this problem by simply getting rid of COD (for other reasons than the reason to disable the module - high cost, lots of paperwork and high number of unclaimed packages...)

    I have however bumped into the same problem again and gave this solution a shot, but it don't seem to work ... Tried it both on the module in question and on the standard moneyorder module in Zen Cart (1.3.9h), no dice...

    Any advice?

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

    Default Re: Payment modules linked to products

    Go to phpMyAdmin and search for some of the products_id in the products table and see what their master_categories_id are set to ...

    Are these what you are using in the custom code?
    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: v1.5.5]
    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. Add payment gateway to admin payment modules list.
    By provida in forum General Questions
    Replies: 2
    Last Post: 3 Feb 2010, 05:59 PM
  2. Deleted payment gateway still in payment modules listing
    By jcdk in forum Built-in Shipping and Payment Modules
    Replies: 2
    Last Post: 22 Nov 2009, 04:13 PM
  3. Stock control of Linked Categories and Linked Products
    By limelites in forum Setting Up Categories, Products, Attributes
    Replies: 10
    Last Post: 7 Apr 2009, 09:45 AM

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