diff --git a/lib/WebGUI/Asset/Sku/Product.pm b/lib/WebGUI/Asset/Sku/Product.pm index 306b439dc..51f26eb74 100644 --- a/lib/WebGUI/Asset/Sku/Product.pm +++ b/lib/WebGUI/Asset/Sku/Product.pm @@ -955,22 +955,37 @@ sub www_editParameterOptions { my $self = shift; return $self->session->privilege->insufficient() unless ($self->canEdit); return 1; - my $param = shift || $self->session->form->get('name') || 'new'; + my $session = $self->session; + my $param = shift || $self->session->form->get('name'); my $paramData = $self->getParamData; - $param = "new" unless exists $paramData->{$param}; + if (! exists $paramData->{$param}) { + return $self->editParameter($param); + } + my $option = $paramData->{$param}; my $i18n = WebGUI::International->new($self->session,'Asset_Product'); my $f = WebGUI::HTMLForm->new($self->session,-action=>$self->getUrl); $f->hidden( -name => "func", -value => "editParameterOptionSave", ); - $f->text( + $f->readonly( -name => 'name', - -label => $i18n->get('edit parameter name'), - -hoverHelp => $i18n->get('edit parameter name description'), -value => $param, - -maxlength => 64, ); + $f->float( + -name => 'priceModifier', + -label => $i18n->get('edit option price modifier'), + -hoverHelp => $i18n->get('edit option price modifier description'), + -value => $session->form->process("priceModifier") || $option->{priceModifier}, + -maxlength => 11, + ); + $f->float( + -name => 'weightModifier', + -label => $i18n->get('edit option weight modifier'), + -hoverHelp => $i18n->get('edit option weight modifier description'), + -value => $session->form->process("weightModifier") || $option->{weightModifier}, + -maxlength => 7, + ); $f->submit; return $self->getAdminConsole->render($f->print, "edit option"); } diff --git a/lib/WebGUI/i18n/English/Asset_Product.pm b/lib/WebGUI/i18n/English/Asset_Product.pm index 7795cc03c..fa3672b9f 100644 --- a/lib/WebGUI/i18n/English/Asset_Product.pm +++ b/lib/WebGUI/i18n/English/Asset_Product.pm @@ -657,6 +657,28 @@ be useful, others may not.|, context => q|The name of the editParameter form| }, + 'edit option price modifier' => { + message => q|Price modifier|, + lastUpdated => 1208292477, + context => q|The form label for the priceModifier field in editProductParameterOption| + }, + + 'edit option price modifier description' => { + message => q|
The amount this option adds to the default price for product variants containig this option.
|, + lastUpdated => 1146606364, + }, + + 'edit option weight modifier' => { + message => q|Weight modifier|, + lastUpdated => 1208292479, + context => q|The form label for the weightModifier field in editProductParameterOption| + }, + + 'edit option weight modifier description' => { + message => q|The weight this option adds to the default weight for product variants consisting of this option.
|, + lastUpdated => 1208292519, + }, + }; 1;