Jump to content

Disable paypal for free orders


sarwana

Recommended Posts

Hi,

 

I just setup my e-shop but i have a small problem.

 

I will have Virtual product on my site which are free and paid.

 

What I like to do is disable the paypal option if the product price is zero.

 

Can this be done. If yes then how.

 

This is the error i get when someone clicks on paypal button if price is free.

 

 

Unexpected payment error

Unfortunately, an error occured while communicating with PayPal.

Short Error Message: Authentication/Authorization Failed
Detailed Error Message: You do not have permissions to make this API call
Error Code: 10002
Please contact our Customer service and mention this error code to get this issue resolved.

 

 

 

I'm using Payal EU

 

Also I have another request to. How can I stop people buying more then 1 product if it is free. I dont care how many they buy if its paid but for free i like limit them to 1 product only.

 

 

 

I have lastest version of PS installed

 

 

 

 

Link to comment
Share on other sites

I didn't test it, but have a look at the file

 

express_checkout_shortcut_button.tpl

 

Located at modules\paypal\views\templates\hook

 

See if you can wrap it inside this 

 

{if $productPrice}

 

...all the code...

{/if}

 

If not, then the product price variable is not vaid there, try with

{if $product->getPrice()}

{/if}

 

Try the last Product::getPriceStatic($smarty.get.id_product)} if the above fails as well

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...