In this digital era, people are more tending to shop online by making online payments. Even though there are various payment methods available online, but cash on delivery is still hot favorite & trustable payment method compared to other available methods. According to the survey, 70 % of buyers prefer to use cash on delivery to prevent their self from online transnational frauds. Understanding customer convenience and providing better service is must to be ahead in online E-commerce competition. But Everything doesn’t end up here, owning an E-commerce store; you always need to differentiate genuine and spam orders to deliver great user experience over the Internet.
During This festival season, one of our clients came up with requirement to identify genuine orders and remove spam COD orders from his E-commerce store by verifying customer. Previously, due to spam COD orders, he couldn’t locate customer on specified location and at the end of day, he need to pay shipping charges each and every time. To overcome this situation, he wanted to verify his customer mobile when a customer pick cash on delivery from available payment methods. To implement this scenario, we need to override payment\methods.phtml in custom Magento extension.
Go to app\design\frontend\Themes\Yourtheme\layout\extension.xml
<block type="checkout/onepage_payment_methods" name="root" output="toHtml" template="extension/methods.phtml">
Once you have added the above code, you need to add your own custom functionality code within methods.phtml file available at app\design\frontend\Themes\Yourtheme\extension\methods.phtml
You can use and customize above code to override any file on the checkout page as per your need. So, stay tuned to our Magento Blogs and let us know in the comment section if you faced any problem while implementing this code.
Don’t forgot to hit the stars if you like the blog and share it with other Magento users.