The extension automatically calculates COD fee using the following logic:
- Customer selects COD during checkout.
- Subtotal is fetched using
cart->getSubTotal(). - System checks:
- whether minimum amount is satisfied
- whether maximum amount is satisfied
- If conditions match, the COD fee is added to:
$totals[]$total
If any condition fails, the fee is not added.