Solved

Is it possible to remove PayPal on certain product

RJ88
New Member
4 0 0

Hi, hope you are well. Our site has received an email asking us to remove certain products as the violate PayPals terms of service (CBD), we generate a high number of sales through these products so completely removing is not really an option.

I know it's possible to remove the PayPal button from selected product pages, but this will potentially mean that customers would still be able to purchase when adding other items to their basket. Is there a way that if a product is added to the basket the option for PayPal is then removed.

Thanks 

Accepted Solution (1)
sprites
Shopify Partner
5 1 0

This is an accepted solution.

I found a solution that may work for you here.

Obviously you need to work with SKUs and change the gateway provider.

I hope it works.

View solution in original post

Replies 7 (7)

sprites
Shopify Partner
5 1 0

Yes, but only in the Shopify Plus plan.

You can have a script that hides the PayPal option when it finds a CBD related product (using tags, or any other method) in your cart.

RJ88
New Member
4 0 0

Hi Sprites, thanks for your reply. Yes we have a shopify plus account. I have come across the below script. Firstly is this what I would need and secondly, we have multiple CBD products, would I need to change the 1st line of the code and then include the product and repeat this process for each product or am I able to put a collection within there so anything within that is included? Thanks for you help 

 

has_no_paypal_tag = Input.cart.line_items.any? { |line_item| line_item.variant.product.tags.include?('no-paypal') }
  
 if has_no_paypal_tag
 Output.payment_gateways = Input.payment_gateways.delete_if { |payment_gateway| payment_gateway.name.include?("PayPal") }
 else
 Output.payment_gateways = Input.payment_gateways
 end
sprites
Shopify Partner
5 1 0

This is an accepted solution.

I found a solution that may work for you here.

Obviously you need to work with SKUs and change the gateway provider.

I hope it works.

RJ88
New Member
4 0 0

This looks just the thing, thank you so much. I will have a play about tomorrow morning. 

MaggieAloe
Tourist
6 1 3

I have just been onto the community to search for a solution as my issue is exactly the same as this one. However, when I click on the 'here' link I get a message saying page not found.  Is it possible you can send me the resolution

Thank you

HilifeVitamins1
Visitor
1 0 0

Could you possibly update that link that points to a possible solution you found. I also need help with this and it seems to be an important issue to many others I'm finding out as well. Thank you!

MaggieAloe
Tourist
6 1 3

Hi there,

Unfortunately, we did not get a suitable answer from Shopify Support and so we reached out to a developer on Fivr. He informed us that, as we were on the basic package it would not be possible to write this into the script. We have therefore moved our site to Shopwired where the support is fantastic. They were able to write an extension for us for £135 and it works like a dream. You can check it out on our website www.aloeanmore.co.uk  If you want to check out Shopwired you can follow this link  https://www.shopwired.co.uk/?affiliate=260300

Cheeers

Maggie