Skip to content
Rubin Shrestha
  • Rubin Shrestha
  • Profile
  • Blog
  • Nepali Typing
  • Contact
  • Search
Rubin Shrestha
  • Search
  • Rubin Shrestha
  • Profile
  • Blog
  • Nepali Typing
  • Contact
Home » Blog » Magento 2: Enable/Disable Payment methods based on product attribute value
Blog

Magento 2: Enable/Disable Payment methods based on product attribute value

by |Published May 19, 2022

I want to enable/disable the COD payment method based on product attribute. I tried this:
Disable Payment Method at Checkout in Magento 2 Based on Product Attribute

But I am having an issue when I have 2 products in cart where, cod value of one product is set to “yes” and another one set to “no”.
Any help will be appreciated.

  • Magento
  • Magento1
  • Magento2

You may also like

Top 7 Group Discussion Tips To Crack Your Next Interview
Published November 9, 2022

Top 7 Group Discussion Tips To Crack Your Next Interview

A group discussion is a very popular examination format used by various private and government organizations in interviews. In a group discussion, […]

The Ultimate Guide to Off-Page SEO for Magento Websites
Published January 17, 2026

The Ultimate Guide to Off-Page SEO for Magento Websites

Together with on-page SEO and advanced SEO techniques, off-page SEO helps drive organic traffic to your store. You cannot achieve… Continue reading […]

Cognizant Genc Elevate Interview Experience (On-Campus)
Published September 18, 2021

Cognizant Genc Elevate Interview Experience (On-Campus)

Round 1: Registration Process We have to Register on the SuperSet platform and apply for GenC next job in Job Profiles. Select […]

Forrester: Retailers Flock to Magento for E-Commerce Prowess
Published October 14, 2011

Forrester: Retailers Flock to Magento for E-Commerce Prowess

The recently released Forrester Research Online Retailing in Australia 2011: Technology Investment report highlights that e-commerce platforms are a top priority for […]

Interesting

  • Backslash not working from ‘xdotool’ when connecting to Windows host over xfreerdp
  • Is there any revocable notification in Microsoft Teams?
  • Windows Store Missing From Settings Apps
  • CUPS not printing PostScript, but I cannot find an error. Need help troubleshooting
  • UEFI Shell on boot after reinstalling system drive: no FSx: entries in map
  • How to prevent the 802.1x credentials dialog from constantly coming up on macOS with Ubiquiti MAC-based access control?
  • Why does my MySQL “source” command fail with long path name? [closed]
  • Prevent 802.1X credentials dialog on MacOS with Ubiquiti MAC-based control

Post navigation

  • Previous post How to write php unit test for a controller ? Magento 2
  • Back to post list
  • Next post How to show available data first then show the data respective to dropdown selection in Magento 2
——————-
  • Backslash not working from ‘xdotool’ when connecting to Windows host over xfreerdp
  • Is there any revocable notification in Microsoft Teams?
  • Windows Store Missing From Settings Apps
  • CUPS not printing PostScript, but I cannot find an error. Need help troubleshooting
  • UEFI Shell on boot after reinstalling system drive: no FSx: entries in map
——————-
  • Rubin Shrestha
  • Profile
  • Blog
  • Nepali Typing
  • Contact
——————-
  • Blog
  • Contact
  • Nepali Typing | Nepali Unicode | English to Nepali | English Conversion | English Translate | नेपाली to English | नेपाली टाईपिङ
  • Occasional Photography
    • The desert that everybody loves in pictures
  • Photography
  • Rubin Shrestha

© 2026 Rubin Shrestha – All rights reserved

Powered by WP – Designed with the Customizr theme