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
Re: want to restrict paypal and paypal express from speicific products
You could customize it with the code in RED:
Code:
$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;
}
}
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 !!
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:
Code:
$this->enabled = (MODULE_PAYMENT_PAYPALDP_STATUS == 'True');
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
PHP Code:
$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;
}
}
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 ...