POD docs
This commit is contained in:
parent
aa99ced360
commit
34b2068286
7 changed files with 187 additions and 10 deletions
|
|
@ -1,16 +1,18 @@
|
||||||
package WebGUI::Asset::Wobject::HttpProxy::Parse;
|
package WebGUI::Asset::Wobject::HttpProxy::Parse;
|
||||||
|
|
||||||
|
=head1 LEGAL
|
||||||
|
|
||||||
# -------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
# WebGUI is Copyright 2001-2006 Plain Black Corporation.
|
WebGUI is Copyright 2001-2006 Plain Black Corporation.
|
||||||
# -------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
# Please read the legal notices (docs/legal.txt) and the license
|
Please read the legal notices (docs/legal.txt) and the license
|
||||||
# (docs/license.txt) that came with this distribution before using
|
(docs/license.txt) that came with this distribution before using
|
||||||
# this software.
|
this software.
|
||||||
# -------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
# http://www.plainblack.com info@plainblack.com
|
http://www.plainblack.com info@plainblack.com
|
||||||
# -------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
|
|
||||||
|
=cut
|
||||||
|
|
||||||
use HTML::Parser;
|
use HTML::Parser;
|
||||||
use HTML::Entities;
|
use HTML::Entities;
|
||||||
|
|
@ -18,6 +20,16 @@ use URI::URL;
|
||||||
use vars qw(@ISA);
|
use vars qw(@ISA);
|
||||||
@ISA = qw(HTML::Parser);
|
@ISA = qw(HTML::Parser);
|
||||||
|
|
||||||
|
=head1 NAME
|
||||||
|
|
||||||
|
Package WebGUI::Asset::Wobject::HttpProxy::Parse
|
||||||
|
|
||||||
|
=head1 DESCRIPTION
|
||||||
|
|
||||||
|
HTML parser for Asset::Wobject::HttpProxy. Is not able to parse its
|
||||||
|
own output.
|
||||||
|
|
||||||
|
=cut
|
||||||
|
|
||||||
my %tag_attr = (
|
my %tag_attr = (
|
||||||
"body background" => 1,
|
"body background" => 1,
|
||||||
|
|
@ -41,6 +53,12 @@ sub DESTROY {
|
||||||
$self = undef;
|
$self = undef;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
=head2 new ( $class, $session)
|
||||||
|
|
||||||
|
Constructor for parser.
|
||||||
|
|
||||||
|
=cut
|
||||||
|
|
||||||
sub new {
|
sub new {
|
||||||
my $pack = shift;
|
my $pack = shift;
|
||||||
my $self = $pack->SUPER::new();
|
my $self = $pack->SUPER::new();
|
||||||
|
|
@ -57,7 +75,6 @@ sub new {
|
||||||
$self;
|
$self;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
sub filter {
|
sub filter {
|
||||||
my $self=shift;
|
my $self=shift;
|
||||||
$self->parse($self->{Content}); # Make paths absolute and let them return to us
|
$self->parse($self->{Content}); # Make paths absolute and let them return to us
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,16 @@
|
||||||
package WebGUI::Commerce::Item::Event;
|
package WebGUI::Commerce::Item::Event;
|
||||||
|
|
||||||
|
=head1 NAME
|
||||||
|
|
||||||
|
Package WebGUI::Commerce::Item::Event
|
||||||
|
|
||||||
|
=head1 DESCRIPTION
|
||||||
|
|
||||||
|
Item plugin for events in the EventManagement system. Allows events entered there
|
||||||
|
to be part of the Commerce system.
|
||||||
|
|
||||||
|
=cut
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
|
|
||||||
our @ISA = qw(WebGUI::Commerce::Item);
|
our @ISA = qw(WebGUI::Commerce::Item);
|
||||||
|
|
@ -30,6 +41,13 @@ sub name {
|
||||||
}
|
}
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
#-------------------------------------------------------------------
|
||||||
|
|
||||||
|
=head2 new ( $session )
|
||||||
|
|
||||||
|
Overload default constructor to glue in information from the EMS.
|
||||||
|
|
||||||
|
=cut
|
||||||
|
|
||||||
sub new {
|
sub new {
|
||||||
my ($class, $session, $eventId, $eventData);
|
my ($class, $session, $eventId, $eventData);
|
||||||
$class = shift;
|
$class = shift;
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,15 @@
|
||||||
package WebGUI::Commerce::Item::Product;
|
package WebGUI::Commerce::Item::Product;
|
||||||
|
|
||||||
|
=head1 NAME
|
||||||
|
|
||||||
|
Package WebGUI::Commerce::Item::Product
|
||||||
|
|
||||||
|
=head1 DESCRIPTION
|
||||||
|
|
||||||
|
Item plugin for products in the Commerce system.
|
||||||
|
|
||||||
|
=cut
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
#use WebGUI::SQL;
|
#use WebGUI::SQL;
|
||||||
use WebGUI::Product;
|
use WebGUI::Product;
|
||||||
|
|
@ -40,6 +50,13 @@ sub name {
|
||||||
}
|
}
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
#-------------------------------------------------------------------
|
||||||
|
|
||||||
|
=head2 new ( $session )
|
||||||
|
|
||||||
|
Overload default constructor to glue in a WebGUI::Product object.
|
||||||
|
|
||||||
|
=cut
|
||||||
|
|
||||||
sub new {
|
sub new {
|
||||||
my ($class, $session, $sku, $product, $variantId);
|
my ($class, $session, $sku, $product, $variantId);
|
||||||
$class = shift;
|
$class = shift;
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,15 @@
|
||||||
package WebGUI::Commerce::Item::Subscription;
|
package WebGUI::Commerce::Item::Subscription;
|
||||||
|
|
||||||
|
=head1 NAME
|
||||||
|
|
||||||
|
Package WebGUI::Commerce::Item::Subscription
|
||||||
|
|
||||||
|
=head1 DESCRIPTION
|
||||||
|
|
||||||
|
Item plugin for subscriptions.
|
||||||
|
|
||||||
|
=cut
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
#use WebGUI::SQL;
|
#use WebGUI::SQL;
|
||||||
use WebGUI::Subscription;
|
use WebGUI::Subscription;
|
||||||
|
|
@ -37,6 +47,13 @@ sub name {
|
||||||
}
|
}
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
#-------------------------------------------------------------------
|
||||||
|
|
||||||
|
=head2 new ( $session , $subscriptionId, $type )
|
||||||
|
|
||||||
|
Overload default constructor to glue in a WebGUI::Subscription object.
|
||||||
|
|
||||||
|
=cut
|
||||||
|
|
||||||
sub new {
|
sub new {
|
||||||
my ($class, $session, $subscriptionId, $type, $subscription);
|
my ($class, $session, $subscriptionId, $type, $subscription);
|
||||||
$class = shift;
|
$class = shift;
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,27 @@
|
||||||
package WebGUI::Commerce::Shipping::ByPrice;
|
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);
|
our @ISA = qw(WebGUI::Commerce::Shipping);
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
#-------------------------------------------------------------------
|
||||||
|
|
||||||
|
=head2 calc ( $session )
|
||||||
|
|
||||||
|
Calculate the shipping price for this plugin.
|
||||||
|
|
||||||
|
=cut
|
||||||
|
|
||||||
sub calc {
|
sub calc {
|
||||||
my ($self, $items, $price);
|
my ($self, $items, $price);
|
||||||
$self = shift;
|
$self = shift;
|
||||||
|
|
@ -19,6 +36,13 @@ sub calc {
|
||||||
};
|
};
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
#-------------------------------------------------------------------
|
||||||
|
|
||||||
|
=head2 configurationForm ( $session )
|
||||||
|
|
||||||
|
Configuration form for this shipping method.
|
||||||
|
|
||||||
|
=cut
|
||||||
|
|
||||||
sub configurationForm {
|
sub configurationForm {
|
||||||
my ($self, $f);
|
my ($self, $f);
|
||||||
$self = shift;
|
$self = shift;
|
||||||
|
|
@ -45,6 +69,13 @@ sub init {
|
||||||
}
|
}
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
#-------------------------------------------------------------------
|
||||||
|
|
||||||
|
=head2 name ( $session )
|
||||||
|
|
||||||
|
Returns the internationalized name for this shipping plugin.
|
||||||
|
|
||||||
|
=cut
|
||||||
|
|
||||||
sub name {
|
sub name {
|
||||||
my ($session) = @_;
|
my ($session) = @_;
|
||||||
my $i18n = WebGUI::International->new($session, 'CommerceShippingByPrice');
|
my $i18n = WebGUI::International->new($session, 'CommerceShippingByPrice');
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,28 @@
|
||||||
package WebGUI::Commerce::Shipping::ByWeight;
|
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);
|
our @ISA = qw(WebGUI::Commerce::Shipping);
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
#-------------------------------------------------------------------
|
||||||
|
|
||||||
|
=head2 calc ( $session )
|
||||||
|
|
||||||
|
Calculate the shipping price for this plugin.
|
||||||
|
|
||||||
|
=cut
|
||||||
|
|
||||||
sub calc {
|
sub calc {
|
||||||
my ($self, $items, $weight);
|
my ($self, $items, $weight);
|
||||||
$self = shift;
|
$self = shift;
|
||||||
|
|
@ -19,6 +37,13 @@ sub calc {
|
||||||
};
|
};
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
#-------------------------------------------------------------------
|
||||||
|
|
||||||
|
=head2 configurationForm ( $session )
|
||||||
|
|
||||||
|
Configuration form for this shipping method.
|
||||||
|
|
||||||
|
=cut
|
||||||
|
|
||||||
sub configurationForm {
|
sub configurationForm {
|
||||||
my ($self, $f);
|
my ($self, $f);
|
||||||
$self = shift;
|
$self = shift;
|
||||||
|
|
@ -35,6 +60,13 @@ sub configurationForm {
|
||||||
}
|
}
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
#-------------------------------------------------------------------
|
||||||
|
|
||||||
|
=head2 init ( $session )
|
||||||
|
|
||||||
|
Constructor
|
||||||
|
|
||||||
|
=cut
|
||||||
|
|
||||||
sub init {
|
sub init {
|
||||||
my ($class, $self);
|
my ($class, $self);
|
||||||
$class = shift;
|
$class = shift;
|
||||||
|
|
@ -45,6 +77,13 @@ sub init {
|
||||||
}
|
}
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
#-------------------------------------------------------------------
|
||||||
|
|
||||||
|
=head2 name ( $session )
|
||||||
|
|
||||||
|
Returns the internationalized name for this shipping plugin.
|
||||||
|
|
||||||
|
=cut
|
||||||
|
|
||||||
sub name {
|
sub name {
|
||||||
my ($session) = @_;
|
my ($session) = @_;
|
||||||
my $i18n = WebGUI::International->new($session, 'CommerceShippingByWeight');
|
my $i18n = WebGUI::International->new($session, 'CommerceShippingByWeight');
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,27 @@
|
||||||
package WebGUI::Commerce::Shipping::PerTransaction;
|
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);
|
our @ISA = qw(WebGUI::Commerce::Shipping);
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
#-------------------------------------------------------------------
|
||||||
|
|
||||||
|
=head2 calc ( $session )
|
||||||
|
|
||||||
|
Calculate the shipping price for this plugin.
|
||||||
|
|
||||||
|
=cut
|
||||||
|
|
||||||
sub calc {
|
sub calc {
|
||||||
my ($self);
|
my ($self);
|
||||||
$self = shift;
|
$self = shift;
|
||||||
|
|
@ -15,6 +32,13 @@ sub calc {
|
||||||
};
|
};
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
#-------------------------------------------------------------------
|
||||||
|
|
||||||
|
=head2 configurationForm ( $session )
|
||||||
|
|
||||||
|
Configuration form for this shipping method.
|
||||||
|
|
||||||
|
=cut
|
||||||
|
|
||||||
sub configurationForm {
|
sub configurationForm {
|
||||||
my ($self, $f);
|
my ($self, $f);
|
||||||
$self = shift;
|
$self = shift;
|
||||||
|
|
@ -31,6 +55,13 @@ sub configurationForm {
|
||||||
}
|
}
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
#-------------------------------------------------------------------
|
||||||
|
|
||||||
|
=head2 init ( $session )
|
||||||
|
|
||||||
|
Constructor
|
||||||
|
|
||||||
|
=cut
|
||||||
|
|
||||||
sub init {
|
sub init {
|
||||||
my ($class, $self);
|
my ($class, $self);
|
||||||
$class = shift;
|
$class = shift;
|
||||||
|
|
@ -41,6 +72,13 @@ sub init {
|
||||||
}
|
}
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
#-------------------------------------------------------------------
|
||||||
|
|
||||||
|
=head2 name ( $session )
|
||||||
|
|
||||||
|
Returns the internationalized name for this shipping plugin.
|
||||||
|
|
||||||
|
=cut
|
||||||
|
|
||||||
sub name {
|
sub name {
|
||||||
my ($session) = @_;
|
my ($session) = @_;
|
||||||
my $i18n = WebGUI::International->new($session, 'CommerceShippingPerTransaction');
|
my $i18n = WebGUI::International->new($session, 'CommerceShippingPerTransaction');
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue