Fix a Shop bug dealing with shippers that are no longer available. Fixes bug #11001.

This commit is contained in:
Colin Kuskie 2009-09-28 15:56:32 -07:00
parent c8b17b3f68
commit aad5f55601
2 changed files with 4 additions and 1 deletions

View file

@ -17,6 +17,7 @@
- added RFE #10940: Force the user to pick a shipping method before checking out.
- fixed #10988: EMS Schedule -- Data Error
- fixed: DataForm allows edits when locked by another version tag
- fixed #11001: Shipping plugin returning nothing, causing price formatter to puke
7.8.0
- upgraded YUI to 2.8.0r4

View file

@ -865,8 +865,10 @@ sub www_view {
foreach my $option (keys %{$options}) {
$formOptions{$option} = $options->{$option}{label}." (".$self->formatCurrency($options->{$option}{price}).")";
}
my $defaultOption = $self->get('shipperId') ? $self->get('shipperId') : '';
$var{shippingOptions} = WebGUI::Form::selectBox($session, {name=>"shipperId", options=>\%formOptions, value=>$self->get("shipperId")});
if (!exists $options->{$self->get('shipperId')}) {
$self->update({shipperId => ''});
}
if (my $shipperId = $self->get('shipperId')) {
$var{shippingPrice} = $options->{$shipperId}->{price};
}