exposed payment info and payment type to vendor
This commit is contained in:
parent
808fc1476b
commit
8702ee8de2
2 changed files with 20 additions and 4 deletions
|
|
@ -200,7 +200,7 @@ The name of the vendor.
|
||||||
sub update {
|
sub update {
|
||||||
my ($self, $newProperties) = @_;
|
my ($self, $newProperties) = @_;
|
||||||
my $id = id $self;
|
my $id = id $self;
|
||||||
my @fields = (qw(name userId url));
|
my @fields = (qw(name userId url paymentInformation preferredPaymentType));
|
||||||
foreach my $field (@fields) {
|
foreach my $field (@fields) {
|
||||||
$properties{$id}{$field} = (exists $newProperties->{$field}) ? $newProperties->{$field} : $properties{$id}{$field};
|
$properties{$id}{$field} = (exists $newProperties->{$field}) ? $newProperties->{$field} : $properties{$id}{$field};
|
||||||
}
|
}
|
||||||
|
|
@ -256,6 +256,8 @@ sub www_edit {
|
||||||
$f->text(name=>'name', label=>$i18n->get('name'),value=>$properties->{name});
|
$f->text(name=>'name', label=>$i18n->get('name'),value=>$properties->{name});
|
||||||
$f->user(name=>'userId',label=>$i18n->get('username'),value=>$properties->{userId},defaultValue=>3);
|
$f->user(name=>'userId',label=>$i18n->get('username'),value=>$properties->{userId},defaultValue=>3);
|
||||||
$f->url(name=>'url', label=>$i18n->get('company url'),value=>$properties->{url});
|
$f->url(name=>'url', label=>$i18n->get('company url'),value=>$properties->{url});
|
||||||
|
$f->text(name=>'preferredPaymentType', label=>$i18n->get('Preferred Payment Type'),value=>$properties->{preferredPaymentType});
|
||||||
|
$f->textarea(name=>'paymentInformation', label=>$i18n->get('Payment Information'),value=>$properties->{paymentInformation});
|
||||||
$f->submit();
|
$f->submit();
|
||||||
|
|
||||||
# Wrap in admin console
|
# Wrap in admin console
|
||||||
|
|
@ -277,9 +279,11 @@ sub www_editSave {
|
||||||
return $session->privilege->adminOnly() unless ($admin->canManage);
|
return $session->privilege->adminOnly() unless ($admin->canManage);
|
||||||
my $form = $session->form;
|
my $form = $session->form;
|
||||||
my $properties = {
|
my $properties = {
|
||||||
name => $form->get("name","text"),
|
name => $form->get("name","text"),
|
||||||
userId => $form->get("userId","user",'3'),
|
preferredPaymentType => $form->get("preferredPaymentType","text"),
|
||||||
url => $form->get("url","url"),
|
paymentInformation => $form->get("paymentInformation","textarea"),
|
||||||
|
userId => $form->get("userId","user",'3'),
|
||||||
|
url => $form->get("url","url"),
|
||||||
};
|
};
|
||||||
my $self = eval{$class->new($session, $form->get("vendorId"))};
|
my $self = eval{$class->new($session, $form->get("vendorId"))};
|
||||||
if (!WebGUI::Error->caught && defined $self) {
|
if (!WebGUI::Error->caught && defined $self) {
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,18 @@ package WebGUI::i18n::English::Shop;
|
||||||
use strict;
|
use strict;
|
||||||
|
|
||||||
our $I18N = {
|
our $I18N = {
|
||||||
|
'Preferred Payment Type' => {
|
||||||
|
message => q|Preferred Payment Type|,
|
||||||
|
lastUpdated => 0,
|
||||||
|
context => q|vendor label|,
|
||||||
|
},
|
||||||
|
|
||||||
|
'Payment Information' => {
|
||||||
|
message => q|Payment Information|,
|
||||||
|
lastUpdated => 0,
|
||||||
|
context => q|vendor label|,
|
||||||
|
},
|
||||||
|
|
||||||
'thank you message' => {
|
'thank you message' => {
|
||||||
message => q|Thank you for your order! Please save this as your receipt.|,
|
message => q|Thank you for your order! Please save this as your receipt.|,
|
||||||
lastUpdated => 0,
|
lastUpdated => 0,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue