0

I enable in backend option payment "cash on delivery".

I want to ask how to customize and add extra cost to customer basket for select payment "cash on delivery:".

https://prnt.sc/rqrnmj

Any solution?

sales ---> Payment methods   ---> cash on delivery [enable]

Is any way to display here https://prnt.sc/rqrpgv additional field with extra fee charge?

1

Create file in your module etc/adminhtml/system.xml with following content

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_file.xsd">
    <system>
        <section id="payment">
            <group id="cashondelivery">
                <field id="extra_fee" translate="label" type="text" sortOrder="65" showInDefault="1" showInWebsite="1" showInStore="0">
                    <label>Extra Fee Charge</label>
                    <validate>validate-number validate-zero-or-greater</validate>
                </field>
            </group>
        </section>
    </system>
</config>

Result: Extra Fee Charge

6
  • Which module is responsible for Cash On Delivery / shipping options in backend? Thank you for your reply. – Sylvester Apr 1 '20 at 12:48
  • Magento_OfflinePayments – DuxaBilii Apr 1 '20 at 12:57
  • Can you please let me know with path, where is located this module? I try find on vendor/magento but I do not see. Thank you – Sylvester Apr 1 '20 at 13:07
  • vendor/magento/module-offline-payments or app/code/Magento/OfflinePayments – DuxaBilii Apr 1 '20 at 13:20
  • Ok I found it. Thank you. Let me check – Sylvester Apr 1 '20 at 13:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.