nikoz Posted November 23, 2023 Share Posted November 23, 2023 Hi, I'm using Prestahop 1.7 I want to hide/disable the COD payment method for virtual products. I searched a lot on the forums and I only found a few topics very old or addons that I have to buy. I think this should be a very basic function for PrestaShop without having to buy new addons. I have some virtual products (gift cards) and when someone buys one I don't want to be displayed the cash on delivery choice because it is confusing and irrelevant. How can I achieve this ? Maybe adding a piece of code somewhere ? Thank you in advance Link to comment Share on other sites More sharing options...
HalfWolf Posted December 5, 2023 Share Posted December 5, 2023 (edited) On 11/23/2023 at 12:44 PM, nikoz said: Hi, I'm using Prestahop 1.7 I want to hide/disable the COD payment method for virtual products. I searched a lot on the forums and I only found a few topics very old or addons that I have to buy. I think this should be a very basic function for PrestaShop without having to buy new addons. I have some virtual products (gift cards) and when someone buys one I don't want to be displayed the cash on delivery choice because it is confusing and irrelevant. How can I achieve this ? Maybe adding a piece of code somewhere ? You can also read a detailed guide about Merchant cash advance at Thenewsinsides. Thank you in advance Hi there! I understand your concern regarding the need to disable the COD payment method for virtual products in PrestaShop 1.7. While there might not be a built-in function for this, there are a few options you can explore. One suggestion is to check if the product name contains the term "virtual" and, if true, hide/disable the COD payment method. Another option is to look for third-party modules on PrestaShop Addons that offer this functionality. These modules might require a purchase, but they can provide you with the customization and control you need. It's important to review module ratings, reviews, and compatibility before making a decision. Hope this helps! Edited December 7, 2023 by HalfWolf (see edit history) 1 Link to comment Share on other sites More sharing options...
Janett Posted December 5, 2023 Share Posted December 5, 2023 I guess this condition should works to not display the payment method is the cart contains virtual products: https://github.com/PrestaShop/ps_cashondelivery/blob/v2.0.1/ps_cashondelivery.php#L83 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now