Methods, Shipment and Payment

Methods

Methods are a general patterns for an installed plugin allowing diffrent configurations. This allows you to create multiple methods e.g. shipment with each method having different settings.

Methods can generally be restricted by shoppergroups.  Pugins of various types can have their own restrictions.

The second tab of a method for a plugin generally shows the specific additional parameters for that plugin.

Methods belong to a vendor and can be set to shared.

Customfields and userfield plugins are also a kind of methods.

Default Shipment plugin example

Below is a shipment method that has been added to the store using the VirtueMart standard shipment plugin.

Mutliple shipment methods are often configured for a single store.

Notes to calculation of fees

Assume you need $100 and they want 5% as fee. Then you must actually borrow $105 and you have to pay fee for the $5 again => 100 +5 + 0.25 + 0.0125 + 0.00625 + 0.0003125 + ... = ~ 105,2690625....
We use a bit simplified formular and get 105.2631

It sounds first quite reasonable that a fee of 5% and a payment of 100 results in 105. But the The fee is not just x + % of x. Because x + % of x does not consider that the amount to pay increased by 5 and that you have to pay for this 5 again a fee of 5%. The calculation looks like this then => 100 +5 + 0.25 + 0.0125 + 0.000625 + 0.00003125 + ... = ~ 105,26315625.....

This is a geometric progression http://en.wikipedia.org/wiki/Geometric_progression. We use the direct formula

$cartTotalAmount = ($cartTotalAmountOrig + $method->cost_per_transaction) / (1 -($method->cost_percent_total * 0.01));

and get (100 + 0.0) / (1 - (5 * 0.01)) = 105.263157894737