Fix per item shipping in Products.
This commit is contained in:
parent
8f4149d082
commit
448f1ffdf5
4 changed files with 46 additions and 1 deletions
|
|
@ -9,6 +9,7 @@
|
||||||
some results
|
some results
|
||||||
- Exposed a form element for the GalleryAlbum Others Can Add property
|
- Exposed a form element for the GalleryAlbum Others Can Add property
|
||||||
- fixed: EMS 2.0 migration badges
|
- fixed: EMS 2.0 migration badges
|
||||||
|
- fixed: per item shipping
|
||||||
|
|
||||||
7.5.18
|
7.5.18
|
||||||
- fixed: Collateral Image Manager broken in Firefox 3
|
- fixed: Collateral Image Manager broken in Firefox 3
|
||||||
|
|
|
||||||
|
|
@ -31,6 +31,7 @@ my $session = start(); # this line required
|
||||||
# upgrade functions go here
|
# upgrade functions go here
|
||||||
addNewInboxIndexes( $session );
|
addNewInboxIndexes( $session );
|
||||||
updateAddressTable( $session );
|
updateAddressTable( $session );
|
||||||
|
addProductShipping( $session );
|
||||||
finish($session); # this line required
|
finish($session); # this line required
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -45,7 +46,7 @@ finish($session); # this line required
|
||||||
|
|
||||||
#----------------------------------------------------------------------------
|
#----------------------------------------------------------------------------
|
||||||
# Removes the name field and adds a firstName and lastName field
|
# Removes the name field and adds a firstName and lastName field
|
||||||
sub updateAddressTable{
|
sub updateAddressTable {
|
||||||
my $session = shift;
|
my $session = shift;
|
||||||
print "\tUpdating TABLE address... " unless $quiet;
|
print "\tUpdating TABLE address... " unless $quiet;
|
||||||
$session->db->write("ALTER TABLE address DROP COLUMN name");
|
$session->db->write("ALTER TABLE address DROP COLUMN name");
|
||||||
|
|
@ -53,6 +54,15 @@ sub updateAddressTable{
|
||||||
print "\tDone.\n" unless $quiet;
|
print "\tDone.\n" unless $quiet;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#----------------------------------------------------------------------------
|
||||||
|
# Removes the name field and adds a firstName and lastName field
|
||||||
|
sub addProductShipping {
|
||||||
|
my $session = shift;
|
||||||
|
print "\tAdding shippingRequired to the Product table... " unless $quiet;
|
||||||
|
$session->db->write("ALTER TABLE Product add COLUMN isShippingRequired INT(11)");
|
||||||
|
print "\tDone.\n" unless $quiet;
|
||||||
|
}
|
||||||
|
|
||||||
#----------------------------------------------------------------------------
|
#----------------------------------------------------------------------------
|
||||||
# Add new indexes to the inbox to make millions of messages possible
|
# Add new indexes to the inbox to make millions of messages possible
|
||||||
sub addNewInboxIndexes {
|
sub addNewInboxIndexes {
|
||||||
|
|
|
||||||
|
|
@ -128,6 +128,13 @@ sub definition {
|
||||||
deleteFileUrl=>$session->url->page("func=deleteFileConfirm;file=manual;filename="),
|
deleteFileUrl=>$session->url->page("func=deleteFileConfirm;file=manual;filename="),
|
||||||
defaultValue=>undef
|
defaultValue=>undef
|
||||||
},
|
},
|
||||||
|
isShippingRequired => {
|
||||||
|
tab => "shop",
|
||||||
|
fieldType => "yesNo",
|
||||||
|
label => $i18n->get('isShippingRequired'),
|
||||||
|
hoverHelp => $i18n->get('isShippingRequired help'),
|
||||||
|
defaultValue => 0,
|
||||||
|
},
|
||||||
warranty=>{
|
warranty=>{
|
||||||
tab => "properties",
|
tab => "properties",
|
||||||
fieldType=>"file",
|
fieldType=>"file",
|
||||||
|
|
@ -478,6 +485,21 @@ sub getWeight {
|
||||||
return $self->getOptions->{weight};
|
return $self->getOptions->{weight};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#-------------------------------------------------------------------
|
||||||
|
|
||||||
|
=head2 isShippingRequired
|
||||||
|
|
||||||
|
Overriding the method from Sku so that the user can configure it.
|
||||||
|
|
||||||
|
=cut
|
||||||
|
|
||||||
|
sub isShippingRequired {
|
||||||
|
my $self = shift;
|
||||||
|
$self->session->log->warn('is shipping required: '.$self->get('isShippingRequired'));
|
||||||
|
return $self->get('isShippingRequired');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
#-------------------------------------------------------------------
|
||||||
|
|
||||||
=head2 moveCollateralDown ( tableName, keyName, keyValue )
|
=head2 moveCollateralDown ( tableName, keyName, keyValue )
|
||||||
|
|
|
||||||
|
|
@ -841,6 +841,18 @@ be useful, others may not.|,
|
||||||
context => q|template variable|
|
context => q|template variable|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
'isShippingRequired' => {
|
||||||
|
message => q|Is shipping required?|,
|
||||||
|
lastUpdated => 0,
|
||||||
|
context => q|label for the edit sku|
|
||||||
|
},
|
||||||
|
|
||||||
|
'isShippingRequired help' => {
|
||||||
|
message => q|This determines whether shipping costs will be calculated when the user checks out.|,
|
||||||
|
lastUpdated => 0,
|
||||||
|
context => q|hover help for isShippingRequired in the edit sku screen|
|
||||||
|
},
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
1;
|
1;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue