Add an option to the Sku to require individual shipping of this sku, separate
from other items in the cart. Update the FlatRate driver to support calculating that.
This commit is contained in:
parent
e98fc02e9b
commit
db290f91f9
8 changed files with 141 additions and 14 deletions
|
|
@ -56,7 +56,8 @@ These methods are available from this class:
|
|||
|
||||
=head2 addToCart ( options )
|
||||
|
||||
Adds this sku to the current session's cart.
|
||||
Adds this sku to the current session's cart. Returns a copy of the Shop::Cart::Item
|
||||
object added to the cart.
|
||||
|
||||
=head3 options
|
||||
|
||||
|
|
@ -137,6 +138,13 @@ sub definition {
|
|||
fieldType => 'hidden',
|
||||
defaultValue => '{}',
|
||||
},
|
||||
shipsSeparately => {
|
||||
tab => 'shop',
|
||||
fieldType => 'yesNo',
|
||||
defaultValue => 0,
|
||||
label => $i18n->get('shipsSeparate'),
|
||||
hoverHelp => $i18n->get('shipsSeparate help'),
|
||||
},
|
||||
);
|
||||
push(@{$definition}, {
|
||||
assetName=>$i18n->get('assetName'),
|
||||
|
|
@ -594,6 +602,15 @@ sub processStyle {
|
|||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 setTaxConfiguration ($namespace, $configuration)
|
||||
|
||||
=head3 $namespace
|
||||
|
||||
=head3 $configuration
|
||||
|
||||
=cut
|
||||
|
||||
sub setTaxConfiguration {
|
||||
my $self = shift;
|
||||
my $namespace = shift;
|
||||
|
|
@ -615,6 +632,19 @@ sub setTaxConfiguration {
|
|||
} );
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 shipsSeparately
|
||||
|
||||
Returns a boolean indicating whether this item must be shipped separately from other items.
|
||||
|
||||
=cut
|
||||
|
||||
sub shipsSeparately {
|
||||
return shift->get('shipsSeparately');
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 www_view ( )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue