Fix a Shop bug dealing with shippers that are no longer available. Fixes bug #11001.
This commit is contained in:
parent
c8b17b3f68
commit
aad5f55601
2 changed files with 4 additions and 1 deletions
|
|
@ -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};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue