Forums / Built-in Shipping and Payment Modules / want to restrict paypal and paypal express from speicific products

want to restrict paypal and paypal express from speicific products

Started by letsmod on 2 May 2012, 7:07 PM · Views: 1,297

Results 1 to 6 of 6
2 May 2012, 7:07 PM
#1
letsmod avatar

letsmod

New Zenner

Join Date:
Sep 2008
Posts:
42
Plugin Contributions:
0

want to restrict paypal and paypal express from speicific products

I was following this thread (http://www.zen-cart.com/showthread.p...products/page3) and a am a little lost

I want to disable products
ID:682
ID:706

the Master category is 86

from what I am reading I only see the entire category being excempted not a speciific product.

is it even possible or should I create a New category with only those items?

any assistance will be appreciated

2 May 2012, 10:55 PM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: want to restrict paypal and paypal express from speicific products

You could customize it with the code in RED:

    $this->enabled = (MODULE_PAYMENT_PAYPALWPP_STATUS == 'True');
if (!IS_ADMIN_FLAG) {
  $chk_product = 0;
  $chk_product += $_SESSION['cart']->in_cart_check('products_id', 682);
  $chk_product += $_SESSION['cart']->in_cart_check('products_id', 706);
  if ($chk_product > 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!

2 May 2012, 11:44 PM
#3
letsmod avatar

letsmod

New Zenner

Join Date:
Sep 2008
Posts:
42
Plugin Contributions:
0

Re: want to restrict paypal and paypal express from speicific products

I edited the includes/modules/payment/paypaldp.php

that did the trick!

The paypal express logo still shows but when you click on the paypal logo to make payment it send you to an ERROR 505 page not found

thanks !!

2 May 2012, 11:47 PM
#4
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: want to restrict paypal and paypal express from speicific products

You should get no errors ...

On that file the code in RED goes below the line:

    $this->enabled = (MODULE_PAYMENT_PAYPALDP_STATUS == 'True');

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 May 2012, 12:00 AM
#5
letsmod avatar

letsmod

New Zenner

Join Date:
Sep 2008
Posts:
42
Plugin Contributions:
0

Re: want to restrict paypal and paypal express from speicific products

I am aware of where the code goes :smile:

the paypal express logo will not disappear, the user clicks on the paypal logo for express it send to a Error 505 http page

here is a copy/paste

$this->enabled = (MODULE_PAYMENT_PAYPALWPP_STATUS == 'True');
if (!IS_ADMIN_FLAG) {
  $chk_product = 0;
  $chk_product += $_SESSION['cart']->in_cart_check('products_id', 682);
  $chk_product += $_SESSION['cart']->in_cart_check('products_id', 706);
  if ($chk_product > 0) {
    $this->enabled = false;
  }
}
3 May 2012, 1:02 AM
#6
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: want to restrict paypal and paypal express from speicific products

If you mean on the shopping_cart page ... then you will need to customize your shopping cart template using your templates and overrides to determine when to hide the button ...

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!