[set help_name]shipping.edit[/set] [seti page_title]Shipping options: edit method [cgi ui_shipmode][/seti] [seti page_banner]Shipping options: edit method [cgi ui_shipmode][/seti] [set icon_name]admin/icon_config.gif[/set] [set meta_header] [/set] @_UI_STD_HEAD_@ [if scratch ui_update_shipping] [set ui_update_shipping][/set] [bounce page="__UI_BASE__/ship"] [/if] [if cgi ui_shipmode] [perl] my $inmode = $CGI->{ui_shipmode}; #Log("inmode=$inmode"); my $lines = $Config->{Shipping_line}; #Log("shipping: " . $Tag->uneval( { ref => $lines }) ); my $ref; for(@$lines) { next unless $_->[0] eq $inmode; $ref = $_; last; } return if ! $ref; $ref = [] if ! $ref; my ($mode, $desc, $crit, $min, $max, $cost, $query, $opt) = @{$ref}; #Log("gave: " . join("|", @$ref) ); $opt = {} if ! ref $opt; if ($opt->{ui_ship_type}) { #Log("ui_ship_type: $opt->{ui_ship_type}"); $Values->{ui_ship_type} = $opt->{ui_ship_type}; } elsif ( not $Values->{ui_ship_type} = $CGI->{ui_ship_type} ) { if(! $crit) { # do nothing; } elsif($crit eq 'weight') { $Values->{ui_ship_type} = 'weight'; } elsif($crit eq 'volume') { $Values->{ui_ship_type} = 'volume'; } elsif($crit eq 'quantity') { $Values->{ui_ship_type} = 'quantity'; } elsif($crit =~ /^\[subtotal/) { $Values->{ui_ship_type} = '_subtotal'; } else { $Values->{ui_ship_type} = "custom"; $Values->{ui_ship_custom_criteria} = $crit; } } $Values->{ui_ship_message} = $cost; $Values->{ui_ship_description} = $desc; $Values->{ui_ship_ups} = $Values->{ui_ship_type} =~ /^ups/i ? 1 : 0; $Values->{ui_ship_ups_external} = $Values->{ui_ship_type} =~ /^upse/i ? 1 : 0; $Values->{ui_ship_ups_internal} = $Values->{ui_ship_type} =~ /^upsi/i ? 1 : 0; if(! $crit and $Values->{ui_ship_ups}) { $crit = 'weight'; } $Values->{ui_ship_criteria} = $crit; my (@straight) = qw/zone adder at_least origin round table geo/; for(@straight) { $Values->{"ui_ship_$_"} = $opt->{$_}; } return; [/perl] [/if]
[if value ui_ship_ups] [if value ui_ship_ups_internal] [seti available_ups_internal][available_ups_internal][/seti] [else] [/else] [/if] [/if]
Name of this method
(letters/digits only)
Label for this method
Total based on this criteria  
Calculate based on this algorithm

Apply this method by country
(select as many as desired)
[calc] $modes = <<'EOF'; [loop lr=1 search=" ra=yes fi=country st=db ml=1000 rf=code,shipmodes "][loop-line] [/loop] EOF my $mode = $CGI->{ui_shipmode}; my (@c) = map { s/\t.*//; $_ } grep /\b$mode\b/, split /\n/, $modes; $Values->{ui_ship_country} = join "\0", @c; return; [/calc]    except these countries
Minimum shipping charge
Additional shipping calculation
(number only is additional charge)
Round up to nearest even [L currency_symbol]$[/L]
Allow to be zero cost
Message when zero
UPS Zone chart
Table for lookups
UPS Origin Zone[if variable UPS_ORIGIN]
(default __UPS_ORIGIN__)[/if]
Field that chooses UPS destination[if variable UPS_POSTCODE_FIELD]
(default __UPS_POSTCODE_FIELD__)[/if]

[button text="Ok"] do_update_cmd=Ok [/button] [button text="[L]Cancel[/L]"] mv_nextpage=__UI_BASE__/ship mv_todo=back [/button]

@_UI_STD_FOOTER_@