Zen Cart Logo
Forums / Addon Payment Modules / Hide Google/PayPal Express on Negative Subtotal

Hide Google/PayPal Express on Negative Subtotal

Locked

Views: 1,048

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
10 Oct 2009, 5:42 AM
#1
tfgz avatar

tfgz

New Zenner

Join Date:
Aug 2006
Posts:
33
Plugin Contributions:
0

Hide Google/PayPal Express on Negative Subtotal

I've seen a number of posts where people are trying to hide the normal checkout button when using Google Checkout or PayPal Express, but the solutions don't solve the issue that I have.

My shopping cart allows people to sell items to the store, and negative subtotals are incompatible with PayPal and Google.

So, rather than putting in instructions, I would like to hide those two buttons on tpl_shopping_cart_default.php whenever a customer has a negative subtotal.

Any help would be most appreciated.

18 Nov 2009, 5:54 AM
#2
tfgz avatar

tfgz

New Zenner

Join Date:
Aug 2006
Posts:
33
Plugin Contributions:
0

Re: Hide Google/PayPal Express on Negative Subtotal

A simple 'IF' statement should be enough to skip those lines of code, but I haven't come up with one that doesn't kill the page entirely.

Any suggestions?

18 Nov 2009, 6:49 AM
#3
tino_schlegel avatar

tino_schlegel

Totally Zenned

Join Date:
Nov 2007
Location:
Melbourne, Australia
Posts:
532
Plugin Contributions:
0

Re: Hide Google/PayPal Express on Negative Subtotal

Not sure if this is correct, but try

<?php if ($_SESSION['cart']->show_total() < 0 ) { ?>

PAYPAL Button Code

<?php } ?>
18 Nov 2009, 7:58 AM
#4
tfgz avatar

tfgz

New Zenner

Join Date:
Aug 2006
Posts:
33
Plugin Contributions:
0

Re: Hide Google/PayPal Express on Negative Subtotal

should have been > 0

But that did the trick! :clap:

Thank you kindly!