I have notice that in marketpress there isn't a Cash on Delivery method of Payment.
I search on the forum but I don't find what I need.
First of all, I need on my website 3 payment: Manual, PayPal and Cash on Delivery.
So for the Manual Payment and PayPal I don't have problem, but for the Cash on Delivery I create a new method of payment.
I copy the manual-payments.php file into plugins-gateway folder and change the name in cod-cashondelivery.php, also change the all the name inside (was "manual-payments":wink:.
But it's not all... I also need to add an extra cost if the customers choose the Cash on Delivery.
I create a input box where the admin can insert the ammount value of the extra cost, but now there is the problem: how I can add the value to the total ammount of the order?
This is the extra field that I add into cod-cashondelivery.php:
<tr> <th scope="row"><label for="cash-on-delivery-cost"><?php _e('Cost Value', 'mp') ?></label></th> <td> <span class="description"><?php _e('Enter the cost of the COD Cash on Delivery', 'mp') ?></span> <p> <?php echo $mp->format_currency(); ?><input type="text" name="mp[gateways][cash-on-delivery][cost]" value="<?php echo esc_attr($settings['gateways']['cash-on-delivery']['cost']); ?>" size="5" maxlength="10" /> </p> </td> </tr>
If you need I can send the file that I have created.
Thank you in advance.