Index  Up  <<  >>  


Handling charges

Additional handling charges can be defined in the shipping file by setting the form variable mv_handling to a space, comma, or null-separated set of valid shipping modes. The lookup and charges are done in the same fashion, and the additional charges are added to the order. (The user is responsible for displaying the charge on the order report or receipt with a [shipping handling] tag or the like.) All of the shipping modes found in mv_handling will be applied -- if multiple instances are found on a form, the accordingly null-separated values will all be applied. Careful! This should not be done in an item-list unless you take care to account for multiple setting of the variables.

If you wished only to process a handling charge once, you could do safely:

    [item-list]
    [if-item-field very_heavy]
    [perl values]
        return '' if $Values->{mv_handling} =~ /very_heavy/;
        return "<INPUT TYPE=hidden NAME=mv_handling VALUE=very_heavy>";
    [/perl]
    [/if-item-field]
    [/item-list]

A non-blank/non-zero value in the database field very_heavy will then trigger Perl code which will only set mv_handling once.


Index  Up  <<  >>