This commit is contained in:
Colin Kuskie 2006-03-05 06:42:07 +00:00
parent aa99ced360
commit 34b2068286
7 changed files with 187 additions and 10 deletions

View file

@ -1,10 +1,27 @@
package WebGUI::Commerce::Shipping::ByPrice;
=head1 NAME
Package WebGUI::Commerce::Shipping::ByPrice
=head1 DESCRIPTION
Shipping plugin for determining shipping cost by a percentage of total price.
=cut
our @ISA = qw(WebGUI::Commerce::Shipping);
use strict;
#-------------------------------------------------------------------
=head2 calc ( $session )
Calculate the shipping price for this plugin.
=cut
sub calc {
my ($self, $items, $price);
$self = shift;
@ -19,6 +36,13 @@ sub calc {
};
#-------------------------------------------------------------------
=head2 configurationForm ( $session )
Configuration form for this shipping method.
=cut
sub configurationForm {
my ($self, $f);
$self = shift;
@ -45,6 +69,13 @@ sub init {
}
#-------------------------------------------------------------------
=head2 name ( $session )
Returns the internationalized name for this shipping plugin.
=cut
sub name {
my ($session) = @_;
my $i18n = WebGUI::International->new($session, 'CommerceShippingByPrice');

View file

@ -1,10 +1,28 @@
package WebGUI::Commerce::Shipping::ByWeight;
=head1 NAME
Package WebGUI::Commerce::Item::ByWeight
=head1 DESCRIPTION
Shipping plugin for determining shipping cost as a function of the total weight
or products being purchased.
=cut
our @ISA = qw(WebGUI::Commerce::Shipping);
use strict;
#-------------------------------------------------------------------
=head2 calc ( $session )
Calculate the shipping price for this plugin.
=cut
sub calc {
my ($self, $items, $weight);
$self = shift;
@ -19,6 +37,13 @@ sub calc {
};
#-------------------------------------------------------------------
=head2 configurationForm ( $session )
Configuration form for this shipping method.
=cut
sub configurationForm {
my ($self, $f);
$self = shift;
@ -35,6 +60,13 @@ sub configurationForm {
}
#-------------------------------------------------------------------
=head2 init ( $session )
Constructor
=cut
sub init {
my ($class, $self);
$class = shift;
@ -45,6 +77,13 @@ sub init {
}
#-------------------------------------------------------------------
=head2 name ( $session )
Returns the internationalized name for this shipping plugin.
=cut
sub name {
my ($session) = @_;
my $i18n = WebGUI::International->new($session, 'CommerceShippingByWeight');

View file

@ -1,10 +1,27 @@
package WebGUI::Commerce::Shipping::PerTransaction;
=head1 NAME
Package WebGUI::Commerce::Item::PerTransaction
=head1 DESCRIPTION
Shipping plugin for a fixed shipping costs per transaction.
=cut
our @ISA = qw(WebGUI::Commerce::Shipping);
use strict;
#-------------------------------------------------------------------
=head2 calc ( $session )
Calculate the shipping price for this plugin.
=cut
sub calc {
my ($self);
$self = shift;
@ -15,6 +32,13 @@ sub calc {
};
#-------------------------------------------------------------------
=head2 configurationForm ( $session )
Configuration form for this shipping method.
=cut
sub configurationForm {
my ($self, $f);
$self = shift;
@ -31,6 +55,13 @@ sub configurationForm {
}
#-------------------------------------------------------------------
=head2 init ( $session )
Constructor
=cut
sub init {
my ($class, $self);
$class = shift;
@ -41,6 +72,13 @@ sub init {
}
#-------------------------------------------------------------------
=head2 name ( $session )
Returns the internationalized name for this shipping plugin.
=cut
sub name {
my ($session) = @_;
my $i18n = WebGUI::International->new($session, 'CommerceShippingPerTransaction');