/i;
- $product->set({
- skuTemplate => $skuTemplate
- });
- }
-
- $product->setParameter($parameterId, {
- name => $session->form->process("name")
- });
-
- return WebGUI::Operation::execute($session,'editSkuTemplate') if ($session->form->process("parameterId") eq 'new');
- return WebGUI::Operation::execute($session,'manageProduct');
-}
-
-#-------------------------------------------------------------------
-
-=head2 www_editProductParameterOption ( $session )
-
-Edits the options of a product parameter.
-
-=head3 $session
-
-The current WebGUI session object.
-
-=cut
-
-sub www_editProductParameterOption {
- my $session = shift;
- my ($self, $optionId, $option, $f, $i18n);
-
- return $session->privilege->insufficient unless canView($session);
-
- $i18n = WebGUI::International->new($session, 'ProductManager');
-
- $optionId = $session->form->process("optionId");
- unless ($optionId eq 'new') {
- $option = WebGUI::Product->getByOptionId($session,$optionId)->getOption($optionId);
- }
-
- $f = WebGUI::HTMLForm->new($session);
- $f->submit;
- $f->hidden(
- -name => 'op',
- -value => 'editProductParameterOptionSave',
- );
- $f->hidden(
- -name => 'optionId',
- -value => $optionId,
- );
- $f->hidden(
- -name => 'parameterId',
- -value => $session->form->process("parameterId"),
- );
- $f->readOnly(
- -label => $i18n->get('option ID'),
- -value => $optionId
- );
- $f->text(
- -name => 'value',
- -label => $i18n->get('edit option value'),
- -hoverHelp => $i18n->get('edit option value description'),
- -value => $session->form->process("value") || $option->{value},
- -maxlength => 64,
- );
- $f->float(
- -name => 'priceModifier',
- -label => $i18n->get('edit option price modifier'),
- -hoverHelp => $i18n->get('edit option price modifier description'),
- -value => $session->form->process("priceModifier") || $option->{priceModifier},
- -maxlength => 11,
- );
- $f->float(
- -name => 'weightModifier',
- -label => $i18n->get('edit option weight modifier'),
- -hoverHelp => $i18n->get('edit option weight modifier description'),
- -value => $session->form->process("weightModifier") || $option->{weightModifier},
- -maxlength => 7,
- );
- $f->text(
- -name => 'skuModifier',
- -label => $i18n->get('edit option sku modifier'),
- -hoverHelp => $i18n->get('edit option sku modifier description'),
- -value => $session->form->process("skuModifier") || $option->{skuModifier},
- -maxlength => 64,
- );
- $f->submit;
-
- return _submenu($session,$f->print, 'edit option');
-}
-
-#-------------------------------------------------------------------
-
-=head2 www_editProductParameterOptionSave ( $session )
-
-Saves the properties of a Product Parameter Option
-
-=head3 $session
-
-The current WebGUI session object.
-
-=cut
-
-sub www_editProductParameterOptionSave {
- my $session = shift;
- my ($self, @error, $optionId, $product, $i18n);
-
- return $session->privilege->insufficient unless canView($session);
-
- $i18n = WebGUI::International->new($session, 'ProductManager');
-
- push (@error, $i18n->get('edit option value error')) unless ($session->form->process("value"));
- push (@error, $i18n->get('edit option parameterId error')) unless ($session->form->process("parameterId"));
-
- return '
'.WebGUI::Operation::execute($session,'editProduct') if (@error);
-
- $product = WebGUI::Product->getByParameterId($session,$session->form->process("parameterId"));
- $optionId = $session->form->process("optionId");
- $optionId = $product->addOptionToParameter($session->form->process("parameterId")) if ($optionId eq 'new');
- $product->setOption($optionId, {
- value => $session->form->process("value"),
- priceModifier => $session->form->process("priceModifier"),
- weightModifier => $session->form->process("weightModifier"),
- skuModifier => $session->form->process("skuModifier")
- });
-
- return WebGUI::Operation::execute($session,'manageProduct');
-}
-
-#-------------------------------------------------------------------
-
-=head2 www_editProductVariant ( $session )
-
-Returns a form to edit a Product Variant.
-
-=head3 $session
-
-The current WebGUI session object.
-
-=cut
-
-sub www_editProductVariant {
- my $session = shift;
- my ($variantId, $variant, $f, $i18n);
-
- return $session->privilege->insufficient unless canView($session);
-
- $i18n = WebGUI::International->new($session, "ProductManager");
-
- $variantId = $session->form->process("variantId");
- $variant = WebGUI::Product->getByVariantId($session,$variantId)->getVariant($variantId);
-
- $f = WebGUI::HTMLForm->new($session);
- $f->submit;
- $f->hidden(
- -name => 'op',
- -value => 'editProductVariantSave'
- );
- $f->hidden(
- -name => 'variantId',
- -value => $variantId
- );
- $f->readOnly(
- -label => $i18n->get('variant ID'),
- -value => $variant->{variantId}
- );
- $f->float(
- -name => 'price',
- -label => $i18n->get('price override'),
- -hoverHelp => $i18n->get('price override description'),
- -value => $variant->{priceOverride} ? $variant->{price} : ''
- );
- $f->float(
- -name => 'weight',
- -label => $i18n->get('weight override'),
- -hoverHelp => $i18n->get('weight override description'),
- -value => $variant->{weightOverride} ? $variant->{weight} : ''
- );
- $f->text(
- -name => 'sku',
- -label => $i18n->get('sku override'),
- -hoverHelp => $i18n->get('sku override description'),
- -value => $variant->{skuOverride} ? $variant->{sku} : ''
- );
- $f->yesNo(
- -name => 'available',
- -label => $i18n->get('available'),
- -hoverHelp => $i18n->get('available description'),
- -value => $variant->{available}
- );
- $f->submit;
-
- return _submenu($session,$f->print, 'edit variant');
-}
-
-#-------------------------------------------------------------------
-
-=head2 www_editProductVariantSave ( $session )
-
-Saves the properties of a Product Variant.
-
-=head3 $session
-
-The current WebGUI session object.
-
-=cut
-
-sub www_editProductVariantSave {
- my $session = shift;
-my $variantId = $session->form->process("variantId");
-
- return $session->privilege->insufficient unless canView($session);
-
- WebGUI::Product->getByVariantId($session,$variantId)->setVariant($variantId, $session->form->paramsHashRef);
-
- return WebGUI::Operation::execute($session,'listProductVariants');
-}
-
-#-------------------------------------------------------------------
-
-=head2 www_editSkuTemplate ( $session )
-
-Returns a form to edit a Sku Template.
-
-=head3 $session
-
-The current WebGUI session object.
-
-=cut
-
-sub www_editSkuTemplate {
- my $session = shift;
- my ($product, $productId, $output, $f, $name, $i18n);
-
- return $session->privilege->insufficient unless canView($session);
-
- $i18n = WebGUI::International->new($session, "ProductManager");
-
- $productId = $session->form->process("productId");
- $product = WebGUI::Product->new($session,$productId);
-
- $output .= "Available are:
\n";
- $output .= "- base
\n";
- foreach (@{$product->getParameter}) {
- ($name = $_->{name}) =~ s/[ ><]/\./g;
- $output .= "- param.".$name."
\n";
- }
- $output .= "
";
-
- $f = WebGUI::HTMLForm->new($session);
- $f->submit;
- $f->hidden(
- -name => 'op',
- -value => 'editSkuTemplateSave'
- );
- $f->hidden(
- -name => 'productId',
- -value => $productId
- );
- $f->text(
- -name => 'skuTemplate',
- -value => $product->get('skuTemplate'),
- -label => $i18n->get('sku template'),
- );
- $f->submit;
- $output .= $f->print;
-
- return _submenu($session,$output, 'edit sku composition label');
-}
-
-#-------------------------------------------------------------------
-
-=head2 www_editSkuTemplateSave ( $session )
-
-Saves the properties of a Sku Template.
-
-=head3 $session
-
-The current WebGUI session object.
-
-=cut
-
-sub www_editSkuTemplateSave {
- my $session = shift;
- my ($productId) = $session->form->process("productId");
-
- return $session->privilege->insufficient unless canView($session);
-
- WebGUI::Product->new($session,$productId)->set({
- skuTemplate => $session->form->process("skuTemplate"),
- });
-
- return WebGUI::Operation::execute($session,'manageProduct');
-}
-
-#-------------------------------------------------------------------
-
-=head2 www_listProducts ( $session )
-
-Returns a list of products with manage and delete buttons.
-
-=head3 $session
-
-The current WebGUI session object.
-
-=cut
-
-sub www_listProducts {
- my $session = shift;
- my ($self, $sth, $output, $row, $i18n);
-
- return $session->privilege->insufficient unless canView($session);
-
- $i18n = WebGUI::International->new($session, 'ProductManager');
-
- $session->scratch->delete('managingProduct');
-
- $sth = $session->db->read('select * from products order by title');
-
- $output .= '';
- while ($row = $sth->hashRef) {
- $output .= '';
- $output .= '| ';
- $output .= $session->icon->delete('op=deleteProduct;productId='.$row->{productId}, undef, $i18n->get("confirm delete product"));
- $output .= $session->icon->edit('op=manageProduct;productId='.$row->{productId});
- $output .= ' | ';
- $output .= ''.$row->{title}.' | ';
- $output .= '
';
- }
- $output .= '
';
-
- return _submenu($session,$output, 'list products');
-}
-
-#-------------------------------------------------------------------
-
-=head2 www_listProductVariants ( $session )
-
-Returns a list of Product Variants.
-
-=head3 $session
-
-The current WebGUI session object.
-
-=cut
-
-sub www_listProductVariants {
- my $session = shift;
- my ($productId, $product, @variants, %parameters, %options, $output, %composition, $i18n);
-
- return $session->privilege->insufficient unless canView($session);
-
- $i18n = WebGUI::International->new($session, "ProductManager");
-
- $productId = $session->form->process("productId") || $session->scratch->get('managingProduct');
-
- return WebGUI::Operation::execute($session,'listProducts') if ($productId eq 'new' || !$productId);
-
- $product = WebGUI::Product->new($session,$productId);
-
- @variants = sort {$a->{composition} cmp $b->{composition}} @{$product->getVariant};
- tie %parameters, "Tie::IxHash";
- %parameters = map {$_->{parameterId} => $_->{name}} sort {$a->{name} <=> $b->{name}} @{$product->getParameter};
- %options = map {$_->{optionId} => $_->{value}} @{$product->getOption};
-
- $output = WebGUI::Form::formHeader($session);
- $output .= WebGUI::Form::hidden($session,{
- name => 'op',
- value => 'listProductVariantsSave',
- });
- $output .= WebGUI::Form::hidden($session,{
- name => 'productId',
- value => $productId,
- });
- $output .= '';
- $output .= "| ".join(' | ', values(%parameters))." | " if (%parameters);
- $output .= ''.$i18n->get('sku').' | '.
- ''.$i18n->get('price').' | '.
- ''.$i18n->get('weight').' | '.
- ''.$i18n->get('available').' | ';
- $output .= "
";
- foreach (@variants) {
- $output .= "";
- %composition = map {split(/\./, $_)} split(/,/, $_->{composition});
- foreach (keys(%parameters)) {
- $output .= '| '.$options{$composition{$_}}.' | ';
- }
- $output .= ''.$_->{sku}." | ";
- $output .= '*' if ($_->{skuOverride});
- $output .= ' | '.$_->{price}." | ";
- $output .= '*'if ($_->{priceOverride});
- $output .= ' | '.$_->{weight}." | ";
- $output .= '*' if ($_->{weightOverride});
- $output .= " | ";
- $output .= "".WebGUI::Form::checkbox($session,{
- name => 'available',
- value => $_->{variantId},
- checked => $_->{available},
- }).$session->icon->edit('op=editProductVariant;variantId='.$_->{variantId})." | ";
- $output .= "
";
- }
- $output .= "
";
- $output .= WebGUI::Form::submit($session,);
- $output .= WebGUI::Form::formFooter($session,);
-
- return _submenu($session,$output, 'list variants label');
-}
-
-#-------------------------------------------------------------------
-
-=head2 www_listProductVariantsSave ( $session )
-
-Saves the properties of some product variants.
-
-=head3 $session
-
-The current WebGUI session object.
-
-=cut
-
-sub www_listProductVariantsSave {
- my $session = shift;
-
- return $session->privilege->insufficient unless canView($session);
-
- my %availableVariants = map {$_ => 1} $session->form->selectList('available');
-
- my $product = WebGUI::Product->new($session,$session->form->process("productId"));
- my @variants = @{$product->getVariant};
-
- foreach (@variants) {
- $product->setVariant($_->{variantId}, {
- available => $availableVariants{$_->{variantId}} ? '1' : '0'});
- }
-
- return WebGUI::Operation::execute($session,'listProductVariants');
-}
-
-#-------------------------------------------------------------------
-
-=head2 www_manageProduct ( $session )
-
-Returns a screen that displays lots of options for editing all aspects of a product.
-
-=head3 $session
-
-The current WebGUI session object.
-
-=cut
-
-sub www_manageProduct {
- my $session = shift;
- my ($product, $output, $option, $i18n);
-
- return $session->privilege->insufficient unless canView($session);
-
- $i18n = WebGUI::International->new($session, "ProductManager");
-
- my $productId = shift || $session->form->process("productId") || $session->scratch->get('managingProduct');
- return WebGUI::Operation::execute($session,'listProducts') if ($productId eq 'new' || !$productId);
- $session->scratch->set('managingProduct', $productId);
-
- $product = WebGUI::Product->new($session,$productId);
-
- $output .= "".$product->get('title')."
";
- $output .= "".$i18n->get('properties').$session->icon->edit('op=editProduct;productId='.$productId)."
";
- $output .= "";
- $output .= "| ".$i18n->get('productId')." | ".$productId." |
";
- $output .= "| ".$i18n->get('price')." | ".$product->get('price')." |
";
- my $useSalesTax = $product->get('useSalesTax')
- ? $i18n->get(138, 'WebGUI')
- : $i18n->get(139, 'WebGUI');
- $output .= "| ".$i18n->get('useSalesTax')." | ".$useSalesTax." |
";
- $output .= "| ".$i18n->get('weight')." | ".$product->get('weight')." |
";
- $output .= "| ".$i18n->get('sku')." | ".$product->get('sku')." |
";
- $output .= "| ".$i18n->get('description')." | ".$product->get('description')." |
";
- $output .= "| ".$i18n->get('sku template')." | ".WebGUI::HTML::format($product->get('skuTemplate'), 'text')." |
";
- $output .= "
";
-
- $output .= "Parameters
";
- $output .= ''.
- $i18n->get('add parameter').'
';
- foreach my $parameter (@{$product->getParameter}) {
- $output .= $session->icon->delete('op=deleteProductParameter;parameterId='.$parameter->{parameterId}).
- $session->icon->edit('op=editProductParameter;parameterId='.$parameter->{parameterId});
- $output .= ''.$parameter->{name}.'
';
- $output .= ''.
- $i18n->get('add option').'
';
- foreach my $optionId (@{$parameter->{options}}) {
- $option = $product->getOption($optionId);
- $output .= ''.
- $session->icon->delete('op=deleteProductParameterOption;optionId='.$option->{optionId}).
- $session->icon->edit('op=editProductParameterOption;parameterId='.$parameter->{parameterId}.';optionId='.$option->{optionId}).$option->{value}.'
';
- }
- $output .= '
';
- }
-
- return _submenu($session,$output, 'manage product');
-}
-
-1;
-
diff --git a/lib/WebGUI/Operation/Subscription.pm b/lib/WebGUI/Operation/Subscription.pm
deleted file mode 100644
index af966688a..000000000
--- a/lib/WebGUI/Operation/Subscription.pm
+++ /dev/null
@@ -1,669 +0,0 @@
-package WebGUI::Operation::Subscription;
-
-use strict;
-use WebGUI::SQL;
-use WebGUI::HTMLForm;
-use Tie::IxHash;
-use WebGUI::Paginator;
-use WebGUI::Subscription;
-use WebGUI::Commerce::ShoppingCart;
-use WebGUI::AdminConsole;
-use WebGUI::Asset::Template;
-use WebGUI::Form;
-use WebGUI::International;
-
-=head1 NAME
-
-Package WebGUI::Operation::Subscription
-
-=head1 DESCRIPTION
-
-Operational handler for viewing, editing, listing, purchasing/redeeming, and deleting Subscriptions and Subscription Code Batches.
-
-=head2 _generateCode ( $session, codeLength )
-
-Generates a human-readable subscription code, meant to be typed/pasted in somewhere.
-
-=head3 $session
-
-The current WebGUI session object.
-
-=head3 codeLength
-
-The whole number amount of characters you want returned.
-
-=cut
-
-
-#-------------------------------------------------------------------
-sub _generateCode {
- my $session = shift;
- my ($codeLength, @codeElements, $code, $i);
- $codeLength = shift || 64;
- @codeElements = ('A'..'Z', 'a'..'z', 0..9, '-');
-
- for ($i=0; $i < $codeLength; $i++) {
- $code .= $codeElements[rand(63)];
- }
-
- return $code;
-}
-
-=head2 _submenu ( $session )
-
-Returns a rendered Admin Console view, with a standard list of five submenu items.
-
-=head3 $session
-
-The current WebGUI session object.
-
-=head3 workarea
-
-A scalar of HTML that defines the current workarea.
-
-=head3 title
-
-The i18n key of the title of this workarea.
-
-=cut
-
-#-------------------------------------------------------------------
-sub _submenu {
- my $session = shift;
- my $i18n = WebGUI::International->new($session, "Subscription");
-
- my $workarea = shift;
- my $title = shift;
- $title = $i18n->get($title) if ($title);
- my $ac = WebGUI::AdminConsole->new($session,"subscriptions");
- $ac->addSubmenuItem($session->url->page('op=editSubscription;sid=new'), $i18n->get('add subscription'));
- $ac->addSubmenuItem($session->url->page('op=createSubscriptionCodeBatch'), $i18n->get('generate batch'));
- $ac->addSubmenuItem($session->url->page('op=listSubscriptionCodes'), $i18n->get('manage codes'));
- $ac->addSubmenuItem($session->url->page('op=listSubscriptionCodeBatches'), $i18n->get('manage batches'));
- $ac->addSubmenuItem($session->url->page('op=listSubscriptions'), 'Manage Subscriptions');
- return $ac->render($workarea, $title);
-}
-
-#----------------------------------------------------------------------------
-
-=head2 canView ( session [, user] )
-
-Returns true if the user can administrate this operation. user defaults to
-the current user.
-
-=cut
-
-sub canView {
- my $session = shift;
- my $user = shift || $session->user;
- return $user->isInGroup( $session->setting->get("groupIdAdminSubscription") );
-}
-
-#----------------------------------------------------------------------------
-
-=head2 www_createSubscriptionCodeBatch ( $session, error )
-
-Form to accept parameters to create a batch of subscription codes.
-
-=head3 $session
-
-The current WebGUI session object.
-
-=head3 error
-
-An HTML scalar of an error message to be returned to the user.
-
-=cut
-
-sub www_createSubscriptionCodeBatch {
- my $session = shift;
- my (%subscriptions, $f, $error, $errorMessage);
- return $session->privilege->adminOnly() unless canView($session);
-
- $error = shift;
- my $i18n = WebGUI::International->new($session, "Subscription");
-
- $errorMessage = $i18n->get('create batch error').'' if ($error);
-
- tie %subscriptions, "Tie::IxHash";
- %subscriptions = $session->db->buildHash("select subscriptionId, name from subscription where deleted != 1 order by name");
-
- $f = WebGUI::HTMLForm->new($session);
- $f->submit;
- $f->hidden(
- -name => 'op',
- -value => 'createSubscriptionCodeBatchSave'
- );
- $f->integer(
- -name => 'noc',
- -label => $i18n->get('noc'),
- -hoverHelp => $i18n->get('noc description'),
- -value => $session->form->process("noc") || 1
- );
- $f->integer(
- -name => 'codeLength',
- -label => $i18n->get('code length'),
- -hoverHelp => $i18n->get('code length description'),
- -value => $session->form->process("codeLength") || 64
- );
- $f->interval(
- -name => 'expires',
- -label => $i18n->get('codes expire'),
- -hoverHelp => $i18n->get('codes expire description'),
- -value => $session->form->process("expires") || $session->datetime->intervalToSeconds(1, 'months')
- );
- my @sub = $session->form->selectList("subscriptionId");
- $f->selectList(
- -name => 'subscriptionId',
- -label => $i18n->get('association'),
- -hoverHelp => $i18n->get('association description'),
- -options=> \%subscriptions,
- -multiple=>1,
- -size => 5,
- -value => \@sub
- );
- $f->textarea(
- -name => 'description',
- -label => $i18n->get('batch description'),
- -hoverHelp => $i18n->get('batch description description'),
- -value => $session->form->process("description")
- );
- $f->submit;
-
- return _submenu($session,$errorMessage.$f->print, 'create batch menu');
-}
-
-=head2 www_createSubscriptionCodeBatchSave ( $session )
-
-Method that accepts the form parameters to create a batch of subscription codes.
-
-=head3 $session
-
-The current WebGUI session object.
-
-=cut
-
-
-#-------------------------------------------------------------------
-sub www_createSubscriptionCodeBatchSave {
- my $session = shift;
- my ($numberOfCodes, $description, $expires, $batchId, @codeElements, $currentCode, $code, $i, @subscriptions,
- @error, $creationEpoch);
- return $session->privilege->adminOnly() unless canView($session);
-
- my $i18n = WebGUI::International->new($session, "Subscription");
-
- $numberOfCodes = $session->form->process("noc");
- $description = $session->form->process("description");
- $expires = $session->form->interval('expires');
- $batchId = $session->id->generate;
-
- push(@error, $i18n->get('no description error')) unless ($description);
- push(@error, $i18n->get('no association error')) unless ($session->form->process("subscriptionId"));
- push(@error, $i18n->get('code length error')) unless ($session->form->process("codeLength") >= 10 && $session->form->process("codeLength") <= 64 && $session->form->process("codeLength") =~ m/^\d\d$/);
-
- return www_createSubscriptionCodeBatch($session,\@error) if (@error);
-
- $creationEpoch =$session->datetime->time();
-
- $session->db->write("insert into subscriptionCodeBatch (batchId, description) values (".
- $session->db->quote($batchId).", ".$session->db->quote($description).")");
-
- for ($currentCode=0; $currentCode < $numberOfCodes; $currentCode++) {
- $code = _generateCode($session,$session->form->process("codeLength"));
- $code = _generateCode($session,$session->form->process("codeLength")) while ($session->db->quickArray("select code from subscriptionCode where code=".$session->db->quote($code)));
-
- $session->db->write("insert into subscriptionCode (batchId, code, status, dateCreated, dateUsed, expires, usedBy)".
- " values (".$session->db->quote($batchId).",".$session->db->quote($code).", 'Unused', ".$session->db->quote($creationEpoch).", 0, ".$session->db->quote($expires).", 0)");
- @subscriptions = $session->form->selectList('subscriptionId');
- foreach (@subscriptions) {
- $session->db->write("insert into subscriptionCodeSubscriptions (code, subscriptionId) values (".
- $session->db->quote($code).", ".$session->db->quote($_).")");
- }
- }
-
- return www_listSubscriptionCodeBatches($session);
-}
-
-=head2 www_deleteSubscription ( $session )
-
-Method that deletes the subscription passed by the user through the form variable 'sid'.
-
-=head3 $session
-
-The current WebGUI session object.
-
-=cut
-
-
-#-------------------------------------------------------------------
-sub www_deleteSubscription {
- my $session = shift;
- return $session->privilege->adminOnly() unless canView($session);
-
- WebGUI::Subscription->new($session,$session->form->process("sid"))->delete;
- return www_listSubscriptions($session);
-}
-
-=head2 www_deleteSubscriptionCodeBatch ( $session )
-
-Method that deletes the subscription code batch passed by the user through the form variable 'bid'.
-
-=head3 $session
-
-The current WebGUI session object.
-
-=cut
-
-
-#-------------------------------------------------------------------
-sub www_deleteSubscriptionCodeBatch {
- my $session = shift;
- return $session->privilege->adminOnly() unless canView($session);
-
- $session->db->write("delete from subscriptionCodeBatch where batchId=".$session->db->quote($session->form->process("bid")));
- $session->db->write("delete from subscriptionCode where batchId=".$session->db->quote($session->form->process("bid")));
-
- return www_listSubscriptionCodeBatches($session);
-}
-
-=head2 www_deleteSubscriptionCodes ( $session )
-
-Method that deletes some subscription codes.
-
-=head3 $session
-
-The current WebGUI session object.
-
-=cut
-
-
-#-------------------------------------------------------------------
-sub www_deleteSubscriptionCodes {
- my $session = shift;
- return $session->privilege->adminOnly() unless canView($session);
-
- if ($session->form->process("selection") eq 'dc') {
- $session->db->write("delete from subscriptionCode where dateCreated >= ".$session->db->quote($session->form->process("dcStart")).
- ' and dateCreated <= '.$session->db->quote($session->form->process("dcStop")));
- } elsif ($session->form->process("selection") eq 'du') {
- $session->db->write("delete from subscriptionCode where dateUsed >= ".$session->db->quote($session->form->process("duStart")).
- ' and dateUsed <= '.$session->db->quote($session->form->process("duStop")));
- }
-
- return www_listSubscriptionCodes($session);
-}
-
-=head2 www_editSubscription ( $session )
-
-Returns a form so the user can edit the properties of a subscription. Uses the form variable 'sid'.
-
-=head3 $session
-
-The current WebGUI session object.
-
-=cut
-
-
-#-------------------------------------------------------------------
-sub www_editSubscription {
- my $session = shift;
- my ($properties, $subscriptionId, $durationInterval, $durationUnits, $f);
- return $session->privilege->adminOnly() unless canView($session);
-
- my $i18n = WebGUI::International->new($session, "Subscription");
-
- unless ($session->form->process("sid") eq 'new') {
- $properties = WebGUI::Subscription->new($session,$session->form->process("sid"))->get;
- }
-
- $subscriptionId = $session->form->process("sid") || 'new';
-
- $f = WebGUI::HTMLForm->new($session);
- $f->submit;
- $f->hidden(
- -name => 'op',
- -value => 'editSubscriptionSave'
- );
- $f->hidden(
- -name => 'sid',
- -value => $subscriptionId
- );
- $f->readOnly(
- -label => $i18n->get('subscriptionId'),
- -value => $subscriptionId
- );
- $f->text(
- -name => 'name',
- -label => $i18n->get('subscription name'),
- -hoverHelp => $i18n->get('subscription name description'),
- -value => $properties->{name}
- );
- $f->float(
- -name => 'price',
- -label => $i18n->get('subscription price'),
- -hoverHelp => $i18n->get('subscription price description'),
- -value => $properties->{price} || '0.00'
- );
- $f->yesNo(
- -name => 'useSalesTax',
- -label => $i18n->get('useSalesTax'),
- -hoverHelp => $i18n->get('useSalesTax description'),
- -value => $properties->{useSalesTax} || 0,
- );
- $f->textarea(
- -name => 'description',
- -label => $i18n->get('subscription description'),
- -hoverHelp => $i18n->get('subscription description description'),
- -value => $properties->{description}
- );
- $f->group(
- -name => 'subscriptionGroup',
- -label => $i18n->get('subscription group'),
- -hoverHelp => $i18n->get('subscription group description'),
- -value => [$properties->{subscriptionGroup} || 2]
- );
- $f->selectBox(
- -name => 'duration',
- -label => $i18n->get('subscription duration'),
- -hoverHelp => $i18n->get('subscription duration description'),
- -value => $properties->{duration} || 'Monthly',
- -options=> WebGUI::Commerce::Payment->recurringPeriodValues($session),
- );
- $f->text(
- -name => 'executeOnSubscription',
- -label => $i18n->get('execute on subscription'),
- -hoverHelp => $i18n->get('execute on subscription description'),
- -value => $properties->{executeOnSubscription}
- );
- if ($session->setting->get("useKarma")) {
- $f->integer(
- -name => 'karma',
- -label => $i18n->get('subscription karma'),
- -hoverHelp => $i18n->get('subscription karma description'),
- -value => $properties->{karma} || 0
- );
- }
- $f->submit;
- return _submenu($session,$f->print, 'edit subscription title');
-}
-
-=head2 www_editSubscriptionSave ( $session )
-
-Saves the properties of a subscription.
-
-=head3 $session
-
-The current WebGUI session object.
-
-=cut
-
-
-#-------------------------------------------------------------------
-sub www_editSubscriptionSave {
- my $session = shift;
- my (@relevantFields);
- return $session->privilege->adminOnly() unless canView($session);
-
- my $properties = {};
- @relevantFields = qw(subscriptionId name useSalesTax price description subscriptionGroup duration executeOnSubscription karma);
- foreach (@relevantFields) {
- $properties->{$_} = $session->form->process($_) if (defined $session->form->process($_));
- }
-
- WebGUI::Subscription->new($session,$session->form->process("sid"))->set($properties);
- return www_listSubscriptions($session);
-}
-
-=head2 www_listSubscriptionCodeBatches ( $session )
-
-Returns a paginated list of batches of subscription codes, along with various links for each one.
-
-=head3 $session
-
-The current WebGUI session object.
-
-=cut
-
-
-#-------------------------------------------------------------------
-sub www_listSubscriptionCodeBatches {
- my $session = shift;
- my ($p, $batches, $output);
- return $session->privilege->adminOnly() unless canView($session);
-
- my $i18n = WebGUI::International->new($session, "Subscription");
-
- $p = WebGUI::Paginator->new($session,$session->url->page('op=listSubscriptionCodeBatches'));
- $p->setDataByQuery("select * from subscriptionCodeBatch");
-
- $batches = $p->getPageData;
-
- $output = $p->getBarTraditional($session->form->process("pn"));
- $output .= '';
- foreach (@{$batches}) {
- $output .= '| ';
- $output .= $session->icon->delete('op=deleteSubscriptionCodeBatch;bid='.$_->{batchId}, undef, $i18n->get('delete batch confirm'));
- $output .= ' | '.$_->{description}.' | ';
- $output .= ''.$i18n->get('list codes in batch').' | ';
- $output .= '
';
- }
- $output .= '
';
- $output .= $p->getBarTraditional($session->form->process("pn"));
-
- $output = $i18n->get('no subscription code batches') unless (@{$batches});
-
- return _submenu($session,$output, 'manage batches');
-}
-
-=head2 www_listSubscriptionCodes ( $session )
-
-Non-templated. Returns a paginated list of subscription codes.
-
-=head3 $session
-
-The current WebGUI session object.
-
-=cut
-
-
-#-------------------------------------------------------------------
-sub www_listSubscriptionCodes {
- my $session = shift;
- my ($p, $codes, $output, $where, $ops, $delete);
- return $session->privilege->adminOnly() unless canView($session);
-
- my $i18n = WebGUI::International->new($session, "Subscription");
-
- my $dcStart = $session->form->date('dcStart');
- my $dcStop = $session->datetime->addToTime($session->form->date('dcStop'),23,59);
- my $duStart = $session->form->date('duStart');
- my $duStop = $session->datetime->addToTime($session->form->date('duStop'),23,59);
- my $batches = $session->db->buildHashRef("select batchId, description from subscriptionCodeBatch");
-
- $output .= $i18n->get('selection message');
-
- $output .= WebGUI::Form::formHeader($session);
- $output .= WebGUI::Form::hidden($session,{name=>'op', value=>'listSubscriptionCodes'});
- $output .= '';
- $output .= '| '.WebGUI::Form::radio($session,{name=>'selection', value => 'du', checked=>($session->form->process("selection") eq 'du')}).' | ';
- $output .= ''.$i18n->get('selection used').' | ';
- $output .= ''.WebGUI::Form::date($session,{name=>'duStart', value=>$duStart}).' '.$i18n->get('and').' '.WebGUI::Form::date($session,{name=>'duStop', value=>$duStop}).' | ';
- $output .= '';
- $output .= '| '.WebGUI::Form::radio($session,{name=>'selection', value => 'dc', checked=>($session->form->process("selection") eq 'dc')}).' | ';
- $output .= ''.$i18n->get('selection created').' | ';
- $output .= ''.WebGUI::Form::date($session,{name=>'dcStart', value=>$dcStart}).' '.$i18n->get('and').' '.WebGUI::Form::date($session,{name=>'dcStop', value=>$dcStop}).' | ';
- $output .= '
';
- $output .= '| '.WebGUI::Form::radio($session,{name=>'selection', value => 'b', checked=>($session->form->process("selection") eq 'b')}).' | ';
- $output .= ''.$i18n->get('selection batch id').' | ';
- $output .= ''.WebGUI::Form::selectList($session,{name => 'bid', value => [$session->form->process("bid")], options => $batches});
- $output .= ' |
';
- $output .= ' | ';
- $output .= ''.WebGUI::Form::submit($session,{value=>$i18n->get('select')}).' | ';
- $output .= '
';
- $output .= '
';
- $output .= WebGUI::Form::formFooter;
-
- if ($session->form->process("selection") eq 'du') {
- $where = " and dateUsed >= ".$session->db->quote($duStart)." and dateUsed <= ".$session->db->quote($duStop);
- $ops = ';duStart='.$duStart.';duStop='.$duStop.';selection=du';
- $delete = ''.$i18n->get('delete codes').'';
- } elsif ($session->form->process("selection") eq 'dc') {
- $where = " and dateCreated >= ".$session->db->quote($dcStart)." and dateCreated <= ".$session->db->quote($dcStop);
- $ops = ';dcStart='.$dcStart.';dcStop='.$dcStop.';selection=dc';
- $delete = ''.$i18n->get('delete codes').'';
- } elsif ($session->form->process("selection") eq 'b') {
- $where = " and t1.batchId=".$session->db->quote($session->form->process("bid"));
- $ops = ';bid='.$session->form->process("bid").';selection=b';
- $delete = ''.$i18n->get('delete codes').'';
- } else {
- return _submenu($session,$output, 'listSubscriptionCodes title');
- }
-
- $p = WebGUI::Paginator->new($session,$session->url->page('op=listSubscriptionCodes'.$ops));
- $p->setDataByQuery("select t1.*, t2.* from subscriptionCode as t1, subscriptionCodeBatch as t2 where t1.batchId=t2.batchId ".$where);
-
- $codes = $p->getPageData;
-
- $output .= '
'.$delete.'
' if ($delete);
- $output .= $p->getBarTraditional($session->form->process("pn"));
- $output .= '
';
- $output .= '';
- $output .= '';
- $output .= '| '.$i18n->get('batch id').' | '.$i18n->get('code').' | '.$i18n->get('creation date').
- ' | '.$i18n->get('dateUsed').' | '.$i18n->get('status').' | '; $output .= '
';
- foreach (@{$codes}) {
- $output .= '';
- $output .= '| '.$_->{batchId}.' | ';
- $output .= ''.$_->{code}.' | ';
- $output .= ''.$session->datetime->epochToHuman($_->{dateCreated}).' | ';
- $output .= '';
- $output .= $session->datetime->epochToHuman($_->{dateUsed}) if ($_->{dateUsed});
- $output .= ' | ';
- $output .= ''.$_->{status}.' | ';
- $output .= '
';
- }
- $output .= '
';
- $output .= $p->getBarTraditional($session->form->process("pn"));
-
- return _submenu($session,$output, 'listSubscriptionCodes title');
-}
-
-=head2 www_listSubscriptions ( $session )
-
-Returns a paginated list of subscriptions along with edit and delete links.
-
-=head3 $session
-
-The current WebGUI session object.
-
-=cut
-
-
-#-------------------------------------------------------------------
-sub www_listSubscriptions {
- my $session = shift;
- my ($p, $subscriptions, $output);
- return $session->privilege->adminOnly() unless canView($session);
-
- my $i18n = WebGUI::International->new($session, "Subscription");
-
- $p = WebGUI::Paginator->new($session,$session->url->page('op=listSubscriptions'));
- $p->setDataByQuery('select subscriptionId, name from subscription where deleted != 1');
- $subscriptions = $p->getPageData;
-
- $output = $p->getBarTraditional($session->form->process("pn"));
- $output .= '';
- foreach (@{$subscriptions}) {
- $output .= '';
- $output .= '| '.$session->icon->edit('op=editSubscription;sid='.$_->{subscriptionId});
- $output .= $session->icon->delete('op=deleteSubscription;sid='.$_->{subscriptionId}, undef, $i18n->get('delete subscription confirm')).' | ';
- $output .= ''.$_->{name}.' | ';
- $output .= '
';
- }
- $output .= '
';
- $output .= $p->getBarTraditional($session->form->process("pn"));
-
- $output = $i18n->get('no subscriptions') unless (@{$subscriptions});
-
- return _submenu($session,$output, 'manage subscriptions');
-}
-
-=head2 www_purchaseSubscription ( $session )
-
-Adds subscription 'sid' to the user's shopping cart and returns the checkout screen.
-
-=head3 $session
-
-The current WebGUI session object.
-
-=cut
-
-
-#-------------------------------------------------------------------
-sub www_purchaseSubscription {
- my $session = shift;
- WebGUI::Commerce::ShoppingCart->new($session)->add($session->form->process("sid"), 'Subscription');
- $session->http->setRedirect($session->url->page('op=checkout'));
- return undef;
-}
-
-=head2 www_redeemSubscriptionCode ( $session )
-
-Returns a form so the user can redeem a subscription code, or actually redeems the subscription code.
-
-=head3 $session
-
-The current WebGUI session object.
-
-=cut
-
-
-#-------------------------------------------------------------------
-sub www_redeemSubscriptionCode {
- my $session = shift;
- my (%codeProperties, @subscriptions, %var, $f);
- my $i18n = WebGUI::International->new($session, "Subscription");
-
- if ($session->form->process("code")) {
- %codeProperties = $session->db->quickHash("select * from subscriptionCode as t1, subscriptionCodeBatch as t2 where ".
- "t1.batchId = t2.batchId and t1.code=".$session->db->quote($session->form->process("code"))." and (t1.dateCreated + t1.expires) > ".$session->db->quote(time));
-
- if ($codeProperties{status} eq 'Unused') {
- # Code is ok
- @subscriptions = $session->db->buildArray("select subscriptionId from subscriptionCodeSubscriptions where code=".$session->db->quote($session->form->process("code")));
- foreach (@subscriptions) {
- WebGUI::Subscription->new($session,$_)->apply;
- }
-
- # Set code to Used
- $session->db->write("update subscriptionCode set status='Used', dateUsed=".$session->db->quote(time)." where code=".$session->db->quote($session->form->process("code")));
-
- $var{batchDescription} = $codeProperties{description};
- $var{message} = $i18n->get('redeem code success');
- } else {
- $var{message} = $i18n->get('redeem code failure');
- }
- } else {
- $var{message} = $i18n->get('redeem code ask for code');
- }
-
- $f = WebGUI::HTMLForm->new($session);
- $f->hidden(
- -name => 'op',
- -value => 'redeemSubscriptionCode'
- );
- $f->text(
- -name => 'code',
- -label => $i18n->get('code'),
- -hoverHelp => $i18n->get('code description'),
- -maxLength => 64,
- -size => 30
- );
- $f->submit;
- $var{codeForm} = $f->print;
-
- return $session->style->userStyle(WebGUI::Asset::Template->new($session,"PBtmpl0000000000000053")->process(\%var));
-}
-
-1;
diff --git a/lib/WebGUI/Product.pm b/lib/WebGUI/Product.pm
deleted file mode 100755
index 3b82cbe45..000000000
--- a/lib/WebGUI/Product.pm
+++ /dev/null
@@ -1,432 +0,0 @@
-package WebGUI::Product;
-
-use strict;
-use WebGUI::Asset::Template;
-
-#-------------------------------------------------------------------
-sub _permute {
- my ($currentSet, @permutations, @result);
- $currentSet = shift;
-
- @permutations = (@_) ? _permute(@_) : [];
- foreach my $permutation (@permutations) {
- foreach my $value (@$currentSet) {
- push(@result, [$value, @{$permutation}]);
- }
- }
-
- return @result;
-}
-
-#-------------------------------------------------------------------
-sub addOptionToParameter {
- my ($self, $parameterId, $properties, $optionId);
- $self = shift;
- $parameterId = shift;
- $properties = shift || {};
-
- $optionId = $self->session->id->generate;
-
- $self->session->db->write("insert into productParameterOptions ".
- "(optionId, parameterId) values ".
- "(".$self->session->db->quote($optionId).", ".$self->session->db->quote($parameterId).")");
-
- $self->{_options}->{$optionId} = {
- %$properties,
- parameterId => $parameterId,
- optionId => $optionId,
- };
- push(@{$self->{_parameters}->{$parameterId}->{options}}, $optionId);
-
- $self->updateVariants;
-
- return $optionId;
-}
-
-#-------------------------------------------------------------------
-sub addParameter {
- my ($self, $properties, $parameterId);
-
- $self = shift;
- $properties = shift;
-
- $parameterId = $self->session->id->generate;
-
- $self->session->db->write("insert into productParameters (parameterId, productId) values ".
- "(".$self->session->db->quote($parameterId).", ".$self->session->db->quote($self->get('productId')).")");
-
- $self->{_parameters}->{$parameterId}->{parameterId} = $parameterId;
- $self->{_parameters}->{$parameterId}->{options} = [];
-
- return $parameterId;
-}
-
-#-------------------------------------------------------------------
-sub delete {
- my ($self) = shift;
-
- foreach (@{$self->getParameter}) {
- $self->session->db->write("delete from productParameterOptions where parameterId=".$self->session->db->quote($_->{parameterId}));
- }
-
- $self->session->db->write("delete from productParameters where productId=".$self->session->db->quote($self->get('productId')));
- $self->session->db->write("delete from productVariants where productId=".$self->session->db->quote($self->get('productId')));
- $self->session->db->write("delete from products where productId=".$self->session->db->quote($self->get('productId')));
-
- return undef;
-}
-
-#-------------------------------------------------------------------
-sub deleteParameter {
- my ($self, $parameterId);
- $self = shift;
- $parameterId = shift;
-
- $self->session->db->write("delete from productParameterOptions where parameterId=".$self->session->db->quote($parameterId));
- $self->session->db->write("delete from productParameters where parameterId=".$self->session->db->quote($parameterId));
-
- $self->updateVariants;
-
- return undef;
-}
-
-#-------------------------------------------------------------------
-sub deleteOption {
- my ($self, $optionId, @options, $parameterId);
- $self = shift;
- $optionId = shift;
-
- $self->session->db->write("delete from productParameterOptions where optionId=".$self->session->db->quote($optionId));
-
- $parameterId = $self->{_options}->{$optionId}->{parameterId};
-
- delete($self->{_options}->{$optionId});
-
- foreach (@{$self->{_parameters}->{$parameterId}->{options}}) {
- push(@options, $_) unless ($_ eq $optionId);
- }
-
- $self->{_parameters}->{$parameterId}->{options} = \@options;
-
- $self->updateVariants;
-
- return undef;
-}
-
-#-------------------------------------------------------------------
-sub get {
- my ($self, $property);
- $self = shift;
- $property = shift;
-
- return $self->{_properties}->{$property} if ($property);
-
- return $self->{_properties};
-}
-
-#-------------------------------------------------------------------
-sub getByOptionId {
- my ($class, $optionId, $productId);
-
- $class = shift;
- my $session = shift;
- $optionId = shift;
-
-
- ($productId) = $session->db->quickArray("select productId from productParameters as t1, productParameterOptions as t2 ".
- "where t1.parameterId=t2.parameterId and t2.optionId=".$session->db->quote($optionId));
-
- return undef unless ($productId);
-
- return WebGUI::Product->new($session,$productId);
-}
-
-#-------------------------------------------------------------------
-sub getByParameterId {
- my ($class, $parameterId, $productId);
- $class = shift;
- my $session = shift;
- $parameterId = shift;
-
- ($productId) = $session->db->quickArray("select productId from productParameters where parameterId=".$session->db->quote($parameterId));
-
- return WebGUI::Product->new($session,$productId);
-}
-
-#-------------------------------------------------------------------
-sub getByVariantId {
- my ($class, $productId, $variantId);
- $class = shift;
- my $session = shift;
- $variantId = shift;
-
- ($productId) = $session->db->quickArray("select productId from productVariants where variantId=".$session->db->quote($variantId));
-
- return WebGUI::Product->new($session,$productId);
-}
-
-#-------------------------------------------------------------------
-sub getOption {
- my ($self, $optionId);
- $self = shift;
- $optionId = shift;
-
- return $self->{_options}->{$optionId} if ($optionId);
-
- return [ values %{$self->{_options}} ];
-}
-
-#-------------------------------------------------------------------
-sub getParameter {
- my ($self, $parameterId);
- $self = shift;
- $parameterId = shift;
-
- return $self->{_parameters}->{$parameterId} if ($parameterId);
-
- return [ values %{$self->{_parameters}} ];
-}
-
-#-------------------------------------------------------------------
-sub getVariant {
- my ($self, $variantId);
- $self = shift;
- $variantId = shift;
-
- return $self->{_variants}->{$variantId} if ($variantId);
-
- return [ values %{$self->{_variants}} ];
-}
-
-#-------------------------------------------------------------------
-sub new {
- my ($class, $productId, $properties, $parameters, $variants, $options, $sth, %row, $option, $new);
- $class = shift;
- my $session = shift;
- $productId = shift;
- $session->errorHandler->fatal('no productId') unless ($productId);
- $parameters = {};
- $variants = {};
- $options = {};
- if ($productId eq 'new') {
- $productId = $session->id->generate;
- $properties = {productId => $productId};
- $session->db->write("insert into products (productId) values (".$session->db->quote($productId).")");
- } else {
- $properties = $session->db->quickHashRef("select * from products where productId=".$session->db->quote($productId));
-
- # fetch parameters and options
- $sth = $session->db->read("select opt.*, param.* from productParameters as param left join productParameterOptions as opt ".
- "on param.parameterId=opt.parameterId where param.productId=".$session->db->quote($productId));
- while (%row = $sth->hash) {
- $parameters->{$row{parameterId}} = {
- name => $row{name},
- parameterId => $row{parameterId},
- options => [],
- } unless (defined $parameters->{$row{parameterId}});
- if ($row{value}) {
- $option = {
- value => $row{value},
- optionId => $row{optionId},
- parameterId => $row{parameterId},
- priceModifier => $row{priceModifier},
- weightModifier => $row{weightModifier},
- skuModifier => $row{skuModifier}
- };
- push(@{$parameters->{$row{parameterId}}->{options}}, $row{optionId});
- $options->{$row{optionId}} = $option;
- }
- }
-
- # fetch variants
- $sth = $session->db->read("select * from productVariants where productId=".$session->db->quote($productId));
- while (%row = $sth->hash) {
- $variants->{$row{variantId}} = {%row};
- }
-
- $new = 0;
- }
-
- bless {_session=> $session, _properties => $properties, _parameters => $parameters, _options => $options, _variants => $variants, _new => $new}, $class;
-}
-
-#-------------------------------------------------------------------
-
-=head2 session ( )
-
-Returns a reference to the session.
-
-=cut
-
-sub session {
- my $self = shift;
- return $self->{_session};
-}
-
-#-------------------------------------------------------------------
-sub set {
- my ($self, $properties);
- $self = shift;
- $properties = shift;
-
- $self->session->db->write("update products set ".join(', ', map {$_."=".$self->session->db->quote($properties->{$_})} keys(%$properties)).
- " where productId=".$self->session->db->quote($self->get('productId')));
-
- foreach (keys(%$properties)) {
- $self->{_properties}->{$_} = $properties->{$_};
- }
-
- $self->updateVariants;
-}
-
-#-------------------------------------------------------------------
-sub setParameter {
- my ($self, $parameterId, $properties);
- $self = shift;
- $parameterId = shift;
- $properties = shift;
-
- $self->session->db->write("update productParameters set ".join(', ', map {$_."=".$self->session->db->quote($properties->{$_})} keys(%$properties)).
- " where parameterId=".$self->session->db->quote($parameterId));
-
- map {$self->{_parameter}->{$parameterId}->{$_} = $properties->{$_}} keys %$properties;
-}
-
-#-------------------------------------------------------------------
-sub setOption {
- my ($self, $optionId, $properties);
- $self = shift;
- $optionId = shift;
- $properties = shift;
-
- $self->session->db->write("update productParameterOptions set ".join(', ', map {$_."=".$self->session->db->quote($properties->{$_})} keys(%$properties)).
- " where optionId=".$self->session->db->quote($optionId));
-
- foreach (keys(%$properties)) {
- $self->{_options}->{$optionId}->{$_} = $properties->{$_};
- }
-
- $self->updateVariants;
-}
-
-#-------------------------------------------------------------------
-sub setVariant {
- my ($self, $variantId, $properties, @pairs, $original, %sku, $parameterName);
- $self = shift;
- $variantId = shift;
- $properties = shift;
-
-my %pairs = map {split(/\./, $_)} split(/,/, $self->getVariant($variantId)->{composition});
-
- $original->{price} = $self->get('price');
- $original->{weight} = $self->get('weight');
- $sku{base} = $self->get('sku');
-
- foreach (values(%pairs)) {
-my $currentOption = $self->getOption($_);
- $original->{price} += $currentOption->{priceModifier};
- $original->{weight} += $currentOption->{weightModifier};
- ($parameterName = $self->{_parameters}->{$currentOption->{parameterId}}->{name}) =~ s/ //g;
- $sku{'param.'.$parameterName} = $currentOption->{skuModifier};
- }
- $original->{sku} = WebGUI::Asset::Template->processRaw($self->session, $self->get('skuTemplate'), \%sku );
-
- if (defined $properties->{price}) {
- if ($properties->{price} ne '') {
- push(@pairs, 'price='.$self->session->db->quote($properties->{price}).', priceOverride=1');
- } else {
- push(@pairs, 'price='.$self->session->db->quote($original->{price}).', priceOverride=0');
- }
- }
- if (defined $properties->{weight}) {
- if ($properties->{weight} ne '') {
- push(@pairs, 'weight='.$self->session->db->quote($properties->{weight}).', weightOverride=1');
- } else {
- push(@pairs, 'weight='.$self->session->db->quote($original->{weight}).', weightOverride=0');
- }
- }
- if (defined $properties->{sku}) {
- if ($properties->{sku} ne '') {
- push(@pairs, 'sku='.$self->session->db->quote($properties->{sku}).', skuOverride=1');
- } else {
- push(@pairs, 'sku='.$self->session->db->quote($original->{sku}).', skuOverride=0');
- }
- }
-
- push(@pairs, 'available='.$self->session->db->quote($properties->{available})) if (defined $properties->{available});
-
- $self->session->db->write("update productVariants set ".join(', ', @pairs)." where variantId=".$self->session->db->quote($variantId)) if (@pairs);
-
- $self->{_variants}->{$variantId} = {%{$self->{_variants}->{$variantId}}, %$properties};
-}
-
-#-------------------------------------------------------------------
-sub updateVariants {
- my ($self, %variants, @optionSets, @variants, %var, @composition, @newVariants, $parameterName);
- $self = shift;
-
- foreach (@{$self->getVariant}) {
- $variants{$_->{composition}} = $_;
- }
-
- # group options per parameter so they can be permuted
- foreach my $parameter (@{$self->getParameter}) {
- push (@optionSets, [ map {$self->{_options}->{$_}} @{$parameter->{options}} ] ) if (@{$parameter->{options}});
- }
-
- @variants = _permute(@optionSets);
-
- @variants = ([]) unless (@variants);
- my %newVariants;
- foreach my $variant (@variants) {
- my %sku;
-
- $var{productId} = $self->get('productId');
- $var{price} = $self->get('price');
- $var{weight} = $self->get('weight');
- $var{sku} = $self->get('sku');
- $sku{base} = $self->get('sku');
- @composition = ();
-
- foreach my $option (@{$variant}) {
- $var{price} += $option->{priceModifier};
- $var{weight} += $option->{weightModifier};
- $var{sku} .= $option->{skuModifier};
- ($parameterName = $self->{_parameters}->{$option->{parameterId}}->{name}) =~ s/ //g;
- $sku{'param.'.$parameterName} = $option->{skuModifier};
- $var{description} .= $option->{value};
- push (@composition, $option->{parameterId}.".".$option->{optionId});
- }
-
- $var{composition} = join(',', sort @composition);
- $var{available} = 1;
- $var{sku} = WebGUI::Asset::Template->processRaw($self->session, $self->get('skuTemplate'), \%sku ) || $self->get('sku');
-
- if (defined $variants{$var{composition}}) {
- $var{price} = $variants{$var{composition}}{price} if ($variants{$var{composition}}{priceOverride});
- $var{weight} = $variants{$var{composition}}{weight} if ($variants{$var{composition}}{weightOverride});
- $var{sku} = $variants{$var{composition}}{sku} if ($variants{$var{composition}}{skuOverride});
- $var{available} = 0 unless ($variants{$var{composition}}{available});
- }
-
- if (exists $variants{$var{composition}}) {
- $var{variantId} = $variants{$var{composition}}{variantId},
- } else {
- $var{variantId} = $self->session->id->generate;
- }
-
- push (@newVariants, {%var});
- $newVariants{$var{variantId}} = {%var};
- }
-
- $self->session->db->write("delete from productVariants where productId=".$self->session->db->quote($self->get('productId')));
- foreach (values %newVariants) {
- $self->session->db->write("insert into productVariants (variantId, productId, composition, price, weight, sku, available) values ".
- "(".$self->session->db->quote($_->{variantId}).", ".$self->session->db->quote($_->{productId}).", ".$self->session->db->quote($_->{composition}).", ".$self->session->db->quote($_->{price}).
- ", ".$self->session->db->quote($_->{weight}).", ".$self->session->db->quote($_->{sku}).", ".$self->session->db->quote($_->{available}).")");
- }
-
- $self->{_variants} = \%newVariants;
-}
-
-1;
diff --git a/lib/WebGUI/Subscription.pm b/lib/WebGUI/Subscription.pm
deleted file mode 100644
index fad5dee71..000000000
--- a/lib/WebGUI/Subscription.pm
+++ /dev/null
@@ -1,220 +0,0 @@
-package WebGUI::Subscription;
-
-use strict;
-use WebGUI::Macro;
-use WebGUI::Utility;
-use WebGUI::Commerce::Payment;
-
-=head1 NAME
-
-Package WebGUI::Subscription
-
-=head1 DESCRIPTION
-
-Base class for subscriptions
-
-=head2 _getDuration ( duration, time )
-
-Internal utility function for calculating when a subscription expires.
-Returns the date in epoch format when it expires.
-
-=head3 duration
-
-Text description of how long the subscription lasts.
-
-=head3 time
-
-time from which to calculate expiration date
-
-=cut
-
-sub _getDuration {
- my $self = shift;
- my $duration = shift;
- my $now = shift || time();
- return $self->session->datetime->addToDate($now,0,0,7) if $duration eq 'Weekly';
- return $self->session->datetime->addToDate($now,0,0,14) if $duration eq 'BiWeekly';
- return $self->session->datetime->addToDate($now,0,0,28) if $duration eq 'FourWeekly';
- return $self->session->datetime->addToDate($now,0,1,0) if $duration eq 'Monthly';
- return $self->session->datetime->addToDate($now,0,3,0) if $duration eq 'Quarterly';
- return $self->session->datetime->addToDate($now,0,6,0) if $duration eq 'HalfYearly';
- return $self->session->datetime->addToDate($now,1,0,0) if $duration eq 'Yearly';
-}
-
-#-------------------------------------------------------------------
-
-=head2 _getExpireOffset (durationType)
-
-Returns the offset in seconds based on what is passed in
-
-=head3 durationType
-
-Text descriptoin of how long the subscription lasts
-
-=cut
-
-sub _getExpireOffset {
- my $self = shift;
- my $duration = shift;
-
- my $now = time();
-
- my $durationExpirationDate = $self->_getDuration($duration,$now);
- return ($durationExpirationDate - $now);
-}
-
-#-------------------------------------------------------------------
-
-=head2 apply ( [ $userId ] )
-
-Method for subscribing a user. Adds user to the proper group and sets the expiration date,
-adds karma to the user for purchasing a subscription, and then runs any external commands
-as specified by the executeOnSubscription property. Macros in executeOnSubscription are
-expanded before the command is executed.
-
-=head3 userId
-
-ID of the user purchasing the subscription. If omitted, uses the current user as
-specified by the session variable.
-
-=cut
-
-sub apply {
- my ($self, $userId, $groupId);
- $self = shift;
- $userId = shift || $self->session->user->userId;
- $groupId = $self->{_properties}{subscriptionGroup};
- my $group = WebGUI::Group->new($self->session,$groupId);
- # Make user part of the right group
- $group->addUsers([$userId], $self->_getExpireOffset($self->{_properties}{duration}));
-
- # Add karma
- WebGUI::User->new($self->session,$userId)->karma($self->{_properties}{karma}, 'Subscription', 'Added for purchasing subscription '.$self->{_properties}{name});
-
- # Process executeOnPurchase field
- my $command = $self->{_properties}{executeOnSubscription};
- WebGUI::Macro::process($self->session,\$command);
- system($command) if ($self->{_properties}{executeOnSubscription} ne "");
-}
-
-#-------------------------------------------------------------------
-
-=head2 delete
-
-Method for deleting a subscription. Marks the subscription as deleted in the database
-but does not remove it from the database.
-
-=cut
-
-sub delete {
- my ($self);
- $self = shift;
-
- $self->session->db->write("update subscription set deleted=1 where subscriptionId=".$self->session->db->quote($self->{_subscriptionId}));
- $self->{_properties}{deleted} = 1;
-}
-
-#-------------------------------------------------------------------
-
-=head2 get ( $key )
-
-Generic assessor method for Subscription objects.
-
-=head3 key
-
-Returns only the requested property. Returns undef if the key does not exist
-in the object properties. Returns the entire property hash if the key is
-false (0, undef, '');
-
-=cut
-
-sub get {
- my ($self, $key) = @_;
- return $self->{_properties}{$key} if ($key);
- return $self->{_properties};
-}
-
-#-------------------------------------------------------------------
-
-=head2 new ( session, subscriptionId )
-
-Object creation method.
-
-=head3 session
-
-A reference to the current session.
-
-=head3 subscriptionId
-
-ID of the subscription to create. If this subscriptionId exists in the
-database, the object created will be fully populated with properties
-from the database.
-
-=cut
-
-sub new {
- my ($class, $subscriptionId, %properties);
- $class = shift;
- my $session = shift;
- $subscriptionId = shift;
-
- if ($subscriptionId eq 'new') {
- $subscriptionId = $session->id->generate;
- $session->db->write("insert into subscription (subscriptionId) values (".$session->db->quote($subscriptionId).")");
- }
-
- %properties = $session->db->quickHash("select * from subscription where subscriptionId=".$session->db->quote($subscriptionId));
-
- bless {_session=>$session, _subscriptionId => $subscriptionId, _properties => \%properties}, $class;
-}
-
-#-------------------------------------------------------------------
-
-=head2 session ( )
-
-Returns a reference to the current session.
-
-=cut
-
-sub session {
- my $self = shift;
- return $self->{_session};
-}
-
-#-------------------------------------------------------------------
-
-=head2 set ( $properties )
-
-Returns the date in epoch format when it expires.
-
-=head3 $properties
-
-A hashref containing properties to set in the object. Only valid properties will be
-set. Also updates the subscription record in the database with properties that have
-been set.
-
-=head3 Valid Object properties
-
-name price description subscriptionGroup duration executeOnSubscription karma
-
-=cut
-
-sub set {
- my ($self, $properties, @fieldsToUpdate);
- $self = shift;
- $properties = shift;
-
- foreach (keys(%{$properties})) {
- if (isIn($_, qw(name price useSalesTax description subscriptionGroup duration executeOnSubscription karma))) {
- $self->{_properties}{$_} = $properties->{$_};
- push(@fieldsToUpdate, $_);
- }
- }
-
- $self->session->db->write("update subscription set ".
- join(',', map {"$_=".$self->session->db->quote($properties->{$_})} @fieldsToUpdate).
- " where subscriptionId=".$self->session->db->quote($self->{_subscriptionId}));
-}
-
-1;
-
diff --git a/lib/WebGUI/i18n/English/Commerce.pm b/lib/WebGUI/i18n/English/Commerce.pm
deleted file mode 100755
index 3a9ea1a12..000000000
--- a/lib/WebGUI/i18n/English/Commerce.pm
+++ /dev/null
@@ -1,660 +0,0 @@
-package WebGUI::i18n::English::Commerce;
-use strict;
-
-our $I18N = {
- 'purchase history template' => {
- message => q|View Purchase History Template|,
- lastUpdated => 0,
- context => q|the title for the workflow activity that processes recurring payments|
- },
- 'purchase history template description' => {
- message => q|Controls the layout of the View Purchase History screen. This screen is displayed to the user after a successful checkout is made and shows them all of their past purchases.|,
- lastUpdated => 0,
- context => q|the title for the workflow activity that processes recurring payments|
- },
- 'process recurring payments' => {
- message => q|Process Recurring Payments|,
- lastUpdated => 0,
- context => q|the title for the workflow activity that processes recurring payments|
- },
-
- 'commerce settings' => {
- message => q|Commerce (beta)|,
- lastUpdated => 1101772584,
- context => q|The displayed title of the Commerce Settings in the Admin Console|
- },
-
- 'pay button' => {
- message => q|Pay|,
- lastUpdated => 0,
- context => q|The button on the checkout form.|
- },
-
- 'checkout confirm title' => {
- message => q|Please fill in the form below to purchase these products.|,
- lastUpdated => 0,
- context => q|Message in the checkout form.|
- },
-
- 'general tab' => {
- message => q|General|,
- lastUpdated => 0,
- context => q|The name of the 'general' tab in editCommerce.|
- },
-
- 'payment tab' => {
- message => q|Payment Plugins|,
- lastUpdated => 0,
- context => q|The name of the 'payment plugins' tab in editCommerce.|
- },
-
- 'payment plugin' => {
- message => q|Payment Plugin|,
- lastUpdated => 0,
- context => q|The name of the 'payment plugin' form option in editCommerce.|
- },
-
- 'confirm checkout template' => {
- message => q|Confirm checkout template|,
- lastUpdated => 0,
- context => q|Form label indicating the Confirm checkout template.|
- },
-
- 'checkout canceled template' => {
- message => q|Checkout canceled template|,
- lastUpdated => 0,
- context => q|Form label indicating the Checkout canceled template.|
- },
-
- 'transaction error template' => {
- message => q|Transaction error template|,
- lastUpdated => 0,
- context => q|Form label indicating the Transaction error template.|
- },
-
- 'no payment gateway' => {
- message => q|No payment gateway selected.|,
- lastUpdated => 0,
- context => q|An error message that shows up during checkout process if no payment gateway has been selected|
- },
-
- 'edit commerce settings title' => {
- message => q|Manage Commerce Settings|,
- lastUpdated => 0,
- context => q|Title of the Commerce part of the Admin Console.|
- },
-
-
- 'confirm checkout template description' => {
- message => q|This template is shown when a user is asked to confirm his purchase. The form data for the payment gateway is also shown here.
|,
- lastUpdated => 1138922899,
- },
-
-
- 'transaction error template description' => {
- message => q|This is the template that's shown if any error occurs during the payment process. This could be a declined credit card or a false cvv2 code, for instance. Also an 'error' is triggered by a fraud protection filter or some other service that requires manual interaction from the merchant.
|,
- lastUpdated => 1138922899,
- },
-
-
- 'checkout canceled template description' => {
- message => q|This is the template that the user sees when he cancels the transaction. This normally only occurs with remote-side payment gateways (like PayPal). This is because a site-side payment gateway usually uses a single step process.
|,
- lastUpdated => 1138922899,
- },
-
-
- 'checkout select payment template description' => {
- message => q|This is the template that the user sees when he selects a payment after confirming checkout.
|,
- lastUpdated => 1138923865,
- },
-
-
- 'checkout select shipping template description' => {
- message => q|This is the template that the user sees when he selects a shipping method.
|,
- lastUpdated => 1138923865,
- },
-
-
- 'view shopping cart template description' => {
- message => q|This is the template to customize the display of the user's shopping cart.
|,
- lastUpdated => 1138923865,
- },
-
-
- 'shipping plugin label description' => {
- message => q|Select all plugins that can be used for shipping on your site.
|,
- lastUpdated => 1138924101,
- },
-
-
- 'daily report email description' => {
- message => q|Everyday the scheduler plugin that checks and updates subscriptions sends a report with the successful and failed term payments. Here you can set to which email address it should send this report.
|,
- lastUpdated => 1138922899,
- },
-
-
- 'payment plugin description' => {
- message => q|You can select the payment plugin to use here. Please note that you have to enable the plugins you want to choose from in the WebGUI configuration file. If you don't do this they won't show up here.
-|,
- lastUpdated => 1147797861,
- },
-
-
- 'manage commerce settings' => {
- message => q|Manage commerce settings.|,
- lastUpdated => 1101772609,
- context => q|The menu title for 'Manage commerce settings' in the AdminConsole side menu.|
- },
-
-
- 'pending transactions' => {
- message => q|Show pending transactions.|,
- lastUpdated => 1101772617,
- context => q|The menu title for 'Show pending transactions' in the AdminConsole side menu.|
- },
-
- 'username' => {
- message => q|User|,
- lastUpdated => 0,
- },
-
- 'transactionId' => {
- message => q|TransactionId|,
- lastUpdated => 0,
- context => q|TransactionId, just leave it as it is.|
- },
-
- 'gatewayId' => {
- message => q|Gateway ID|,
- lastUpdated => 0,
- context => q|Gateway ID is the ID the transaction is given by the payment gateway.|,
- },
-
-
- 'init date' => {
- message => q|Initiation Date|,
- lastUpdated => 0,
- context => q|The date on which the transaction was started|
- },
-
-
- 'gateway' => {
- message => q|Gateway|,
- lastUpdated => 0,
- context => q|Table header of the column that identifies the gateway through which the transaction went.|
- },
-
-
- 'weekly' => {
- message => q|Week|,
- lastUpdated => 0,
- context => q|Period name for a weekly subscription.|
- },
-
-
- 'biweekly' => {
- message => q|Two weeks|,
- lastUpdated => 0,
- context => q|Period name for a biweekly subscription.|
- },
-
-
- 'fourweekly' => {
- message => q|Four weeks|,
- lastUpdated => 0,
- context => q|Period name for a four weekly subscription.|
- },
-
-
- 'monthly' => {
- message => q|Month|,
- lastUpdated => 0,
- context => q|Period name for a monthly subscription.|
- },
-
-
- 'quarterly' => {
- message => q|Three months|,
- lastUpdated => 0,
- context => q|Period name for a Quarterly subscription.|
- },
-
-
- 'halfyearly' => {
- message => q|Half year|,
- lastUpdated => 0,
- context => q|Period name for a semi yearly subscription.|
- },
-
-
- 'yearly' => {
- message => q|Year|,
- lastUpdated => 0,
- context => q|Period name for a yearly subscription.|
- },
-
-
- 'transaction error' => {
- message => q|Transaction Error|,
- lastUpdated => 0,
- context => q|Name for 'transaction error' status in the Commerce/TransactionError template.|
- },
-
-
- 'connection error' => {
- message => q|Connection Error|,
- lastUpdated => 0,
- context => q|Name for 'connection error' status in the Commerce/TransactionError template.|
- },
-
-
- 'pending' => {
- message => q|Pending|,
- lastUpdated => 0,
- context => q|Name for 'pending' status in the Commerce/TransactionError template.|
- },
-
-
- 'ok' => {
- message => q|OK|,
- lastUpdated => 0,
- context => q|Name for 'OK' status in the Commerce/TransactionError template.|
- },
-
-
- 'transaction error title' => {
- message => q|An error has occurred in one or more transactions|,
- lastUpdated => 0,
- context => q|The title used in the transaction error template.|
- },
-
-
- 'status codes information' => {
- message => q|The status codes have the following meaning:
-
-
- | ^International("ok","Commerce"); |
- This means that this transaction has been completed successfully. You have purchased the product. |
-
- | ^International("pending","Commerce"); |
- This means that this transaction is under review. This could have a number of causes, and normally this transaction is processed within a short time. |
-
- | ^International("transaction error","Commerce"); |
- An unrecoverable error happened while processing the transaction. |
-
- | ^International("transaction error","Commerce"); |
- Something went wrong with the connection to the payment gateway. The admin has been notified. |
-
-
|,
- lastUpdated => 1110148219,
- context => q|A message that explains the status codes that are returned in the transaction error template.|
- },
-
-
- 'daily report email' => {
- message => q|Send daily report to|,
- lastUpdated => 0,
- context => q|Form label that asks whom to send the daily recurring payments report to.|
- },
-
- 'checkout canceled message' => {
- message => q|The checkout process has been canceled.|,
- lastUpdated => 0,
- context => q|A message that's shown to users that cancel their checkout.|
- },
-
- 'complete pending transaction' => {
- message => q|Complete transaction|,
- lastUpdated => 0,
- context => q|Label for the link that allows you to complete a pending transaction.|
- },
-
- 'list pending transactions' => {
- message => q|List pending transactions|,
- lastUpdated => 0,
- },
-
- 'help cancel checkout template title' => {
- message => q|Cancel checkout template variables|,
- lastUpdated => 1184790373,
- context => q|The title of the help page of the cancel checkout template.|
- },
-
- 'message' => {
- message => q|The internationalized cancellation message.|,
- lastUpdated => 1149221050,
- },
-
- 'title' => {
- message => q|The title to use for this template.|,
- lastUpdated => 1149221320,
- },
-
- 'normalItems' => {
- message => q|The number of normal items in the shopping cart.|,
- lastUpdated => 1149221320,
- },
-
- 'normalItemLoop' => {
- message => q|A loop containing the normal items in the shopping-cart. The following template variables are available in this loop:|,
- lastUpdated => 1149221320,
- },
-
- 'quantity' => {
- message => q|The quantity of the current item in the shopping cart.
|,
- lastUpdated => 1161319738,
- },
-
- 'period' => {
- message => q|The period of the recurring payment.
|,
- lastUpdated => 1161319740,
- },
-
- 'name' => {
- message => q|The name of this item.
|,
- lastUpdated => 1161319741,
- },
-
- 'price' => {
- message => q|The price of one item.
|,
- lastUpdated => 1161319747,
- },
-
- 'totalPrice' => {
- message => q|The price of the quantity of this item. (totalPrice = quantity * price)|,
- lastUpdated => 1161319749,
- },
-
- 'salesTax' => {
- message => q|The amount of sales tax for this item.|,
- lastUpdated => 1161319799,
- },
-
- 'salesTaxRate' => {
- message => q|The sales tax rate, as determined by the user's homeState in his/her profile.|,
- lastUpdated => 1165449949,
- },
-
- 'totalSalesTax' => {
- message => q|The sum of all sales taxes applied to eligible items.|,
- lastUpdated => 1161319799,
- },
-
- 'recurringItems' => {
- message => q|The number of recurring items in the shopping cart.|,
- lastUpdated => 1149221320,
- },
-
- 'recurringItemLoop' => {
- message => q|A loop containing the recurring items in the shopping cart. For available template variables see normalItemLoop|,
- lastUpdated => 1161320125,
- },
-
- 'form' => {
- message => q|The form that's generated by the selected payment plugin.|,
- lastUpdated => 1149221320,
- },
-
-
- 'help checkout confirm template title' => {
- message => q|Confirm checkout template variables|,
- lastUpdated => 0,
- context => q|The title of the help page of the confirm checkout template.|
- },
-
- 'statusExplanation' => {
- message => q|A message which explains the possible statuses an item can have|,
- lastUpdated => 1149221449,
- },
-
- 'resultLoop' => {
- message => q|A template loop containing the items that were checked out.|,
- lastUpdated => 1149221449,
- },
-
- 'purchaseDescription' => {
- message => q|The description of this transaction.
|,
- lastUpdated => 1161319762,
- },
-
- 'status' => {
- message => q|The status of this item.
|,
- lastUpdated => 1161319763,
- },
-
- 'error' => {
- message => q|The error text returned from the payment plugin.
|,
- lastUpdated => 1161319765,
- },
-
- 'errorCode' => {
- message => q|The error code returned from the payment plugin.
|,
- lastUpdated => 1161319767,
- },
-
-
- 'help checkout error template title' => {
- message => q|Checkout error template variables|,
- lastUpdated => 1101791348,
- context => q|The title of the help page of the checkout error template.|
- },
-
- 'no payment plugins selected' => {
- message => q|There are no payment plugins to select. Please enable plugins in the config file.|,
- lastUpdated => 0,
- context => q|The message that's shown in the AdminConsole/Commerce menu when there are no payment plugins enabled.|
- },
-
- 'failed payment plugins' => {
- message => q|The following Payment Plugins failed to compile, please check your log for more information: |,
- lastUpdated => 1101881907,
- context => q|The message that says which payment plugins did not compile.|
- },
-
- 'select payment gateway'=> {
- message => q|Please select a payment gateway.|,
- lastUpdated => 0,
- context => q|The message that asks the user to select a payment gateway.|
- },
-
- 'payment gateway select' => {
- message => q|Select gateway|,
- lastUpdated => 0,
- context => q|The text on the submit button of the select gateway form.|
- },
-
- 'checkout select payment template' => {
- message => q|Select payment gateway template|,
- lastUpdated => 0,
- context => q|The formlabel for the 'select payment gateway template' option in the commerce part of the admin console.|
- },
-
- 'help select payment template title' => {
- message => q|Select payment gateway template variables|,
- lastUpdated => 0,
- context => q|The title of the 'select payment gateway' help page.|
- },
-
- 'gateway message' => {
- message => q|This is the message that ask the user to select a payment gateway.|,
- lastUpdated => 1149221607,
- },
-
- 'pluginsAvailable' => {
- message => q|A boolean value that is true when one or more payment plugins can be loaded and are enabled.|,
- lastUpdated => 1149221607,
- },
-
- 'noPluginsMessage' => {
- message => q|A message that says that there are no payment plugins that ca be used.|,
- lastUpdated => 1149221607,
- },
-
- 'formHeader' => {
- message => q|This contains the form header and all hidden form variables that are needed for a successful checkout.|,
- lastUpdated => 1149221607,
- },
-
- 'formFooter' => {
- message => q|The form footer.|,
- lastUpdated => 1149221607,
- },
-
- 'formSubmit' => {
- message => q|The submit button for this form.|,
- lastUpdated => 1149221607,
- },
-
- 'pluginLoop' => {
- message => q|A template loop containing all enabled payment plugins. Within this loop the following template variables are provided:|,
- lastUpdated => 1149221607,
- },
-
- 'plugin name' => {
- message => q|The name of the plugin.|,
- lastUpdated => 1149221607,
- },
-
- 'namespace' => {
- message => q|The namespace of the plugin. You only need this if you want to create your own custom form elements.|,
- lastUpdated => 1149221607,
- },
-
- 'formElement' => {
- message => q|A radio button tied to this plugin.|,
- lastUpdated => 1149221607,
- },
-
- 'shipping tab' => {
- message => q|Shipping|,
- lastUpdated => 0,
- context => q|The label of the SHipping tab in the commerce settings manager.|
- },
-
- 'salesTax tab' => {
- message => q|SalesTax|,
- lastUpdated => 1159845482,
- context => q|The label of the sales tax tab in the commerce settings manager.|
- },
-
- 'enable sales tax' => {
- message => q|Enable Sales Tax?|,
- lastUpdated => 1160189717,
- context => q|The label field in the commerce setting for enabling sales tax.|
- },
-
- 'enable sales tax description' => {
- message => q|Set this to "Yes" if you would like Sales Tax enabled in the Commerce System. Sales Tax will be applied to any product, subscription or EMS event that has it enabled.|,
- lastUpdated => 1160189808,
- context => q|The label field in the commerce setting for enabling sales tax.|
- },
-
- 'shipping plugin label' => {
- message => q|Shipping plugin|,
- lastUpdated => 0,
- context => q|The label of the shipping plugin selection box in the commerce settings manager.|
- },
-
- 'no shipping plugins selected' => {
- message => q|There are no shipping plugins to select. Please enable plugins in the config file.|,
- lastUpdated => 0,
- context => q|The message that's shown in the AdminConsole/Commerce menu when there are no shipping plugins enabled.|
- },
-
- 'select shipping method' => {
- message => q|Please select a shipping method.|,
- lastUpdated => 0,
- context => q|The message asking the user to choose a shipping method during checkout.|
- },
-
- 'no shipping methods available' => {
- message => q|Shipping is not possible because no shipping plugins are enabled.|,
- lastUpdated => 0,
- context => q|A message that is shown when a user tries to checkout but no shipping plugins are enabled.|
- },
-
- 'shipping select button' => {
- message => q|Select shipping method|,
- lastUpdated => 0,
- context => q|The label of the select button of the select shipping form the user sees during checkout.|
- },
-
- 'enable' => {
- message => q|Enable|,
- lastUpdated => 0,
- context => q|The label of the enable option of the commerce plugins.|
- },
-
- 'change payment gateway' => {
- message => q|Change payment gateway|,
- lastUpdated => 0,
- context => q|The label for the change payament gateway url.|
- },
-
- 'change shipping method' => {
- message => q|Change shipping method|,
- lastUpdated => 0,
- context => q|The label for the change shipping method url.|
- },
-
- 'checkout select shipping template' => {
- message => q|Select shipping method template|,
- lastUpdated => 0,
- context => q|The formlabel for the 'select shipping method template' option in the commerce part of the admin console.|
- },
-
- 'view shopping cart template' => {
- message => q|Select view shopping cart template|,
- lastUpdated => 1134599960,
- context => q|The formlabel for the 'view shopping cart template' option in the commerce part of the admin console.|
- },
-
- 'shopping cart empty' => {
- message => q|Your shopping cart is empty.|,
- lastUpdated => 1134599958,
- context => q|A message indicating that the shopping cart is empty.|
- },
-
- 'update cart' => {
- message => q|Update cart|,
- lastUpdated => 0,
- context => q|The label of the update cart button.|
- },
-
- 'checkout' => {
- message => q|Checkout|,
- lastUpdated => 0,
- context => q|The label of the checkout button.|
- },
-
- 'list transactions' => {
- message => q|List transactions|,
- lastUpdated => 0,
- context => q|List transactions label|
- },
-
- 'view shopping cart' => {
- message => q|View shopping cart|,
- lastUpdated => 0,
- context => q|The label for the view shopping cart link in the confirm checkout screen.|
- },
-
- 'topicName' => {
- message => q|Commerce|,
- lastUpdated => 1128920490,
- },
-
- 'label' => {
- message => q|Label|,
- lastUpdated => 0,
- context => q|Commerce Payment Plugin Label|
- },
-
- 'label hoverhelp' => {
- message => q|Label for displaying payment plugin to users. This will be the display if user can choose from different payment gateways available.|,
- lastUpdated => 0,
- context => q|Hoverhelp for Commerce Payment Plugin Label|
- },
-};
-
-1;
diff --git a/lib/WebGUI/i18n/English/Macro_Product.pm b/lib/WebGUI/i18n/English/Macro_Product.pm
deleted file mode 100644
index 7463785f3..000000000
--- a/lib/WebGUI/i18n/English/Macro_Product.pm
+++ /dev/null
@@ -1,126 +0,0 @@
-package WebGUI::i18n::English::Macro_Product;
-use strict;
-
-our $I18N = {
- 'add to cart' => {
- message => q|Add to cart|,
- lastUpdated => 0,
- context => q|The label for the add to cart link.|
- },
- 'available product configurations' => {
- message => q|Available product configurations|,
- lastUpdated => 0,
- context => q|Message indicatin the available configurations.|
- },
- 'macroName' => {
- message => q|Product|,
- lastUpdated => 1128918830,
- },
-
- 'no sku or id' => {
- message => q|No SKU or productId passed|,
- lastUpdated => 1135117939,
- },
-
- 'cannot find product' => {
- message => q|Cannot find product|,
- lastUpdated => 1128976376,
- },
-
- 'product title' => {
- message => q|Product Macro|,
- lastUpdated => 1128965480,
- },
-
- 'variants.message' => {
- message => q|The internationalized text "^International("available product configurations","Macro_Product");"|,
- lastUpdated => 1149217564,
- },
-
- 'variantLoop' => {
- message => q|A loop containing information about all variants about the Product.|,
- lastUpdated => 1149217564,
- },
-
- 'variant.compositionLoop' => {
- message => q|A loop containing information about all variants about the Product.|,
- lastUpdated => 1149217564,
- },
-
- 'parameter' => {
- message => q|The parameter that defines this variant, for example, size.|,
- lastUpdated => 1149217564,
- },
-
- 'value' => {
- message => q|The value of the parameter, for the example of size, XL.|,
- lastUpdated => 1149217564,
- },
-
- 'variant.variantId' => {
- message => q|The Id for this variant of the Product.|,
- lastUpdated => 1149217564,
- },
-
- 'variant.price' => {
- message => q|The price for this variant of the Product.|,
- lastUpdated => 1149217564,
- },
-
- 'variant.weight' => {
- message => q|The weight for this variant of the Product.|,
- lastUpdated => 1149217564,
- },
-
- 'variant.sku' => {
- message => q|The SKU for this variant of the Product.|,
- lastUpdated => 1149217564,
- },
-
- 'variant.addToCart.url' => {
- message => q|A URL to add this variant of the Product to the user's shopping cart.|,
- lastUpdated => 1149217564,
- },
-
- 'variant.addToCart.label' => {
- message => q|An internationalized label, "^International("add to cart","Macro_Product");",
-to display to the user for adding this variant
-of the Product to their shopping cart.|,
- lastUpdated => 1149217564,
- },
-
- 'productId' => {
- message => q|The unique identifier of this Product.|,
- lastUpdated => 1149217564,
- },
-
- 'title' => {
- message => q|The title for this Product.|,
- lastUpdated => 1149217564,
- },
-
- 'description' => {
- message => q|The description of this Product.|,
- lastUpdated => 1149217564,
- },
-
- 'price' => {
- message => q|The Product's base cost.|,
- lastUpdated => 1149217564,
- },
-
- 'weight' => {
- message => q|The Product's base weight.|,
- lastUpdated => 1149217564,
- },
-
- 'sku' => {
- message => q|The Product's base SKU.|,
- lastUpdated => 1149217564,
- },
-
-
-};
-
-1;
-
diff --git a/lib/WebGUI/i18n/English/Macro_SubscriptionItem.pm b/lib/WebGUI/i18n/English/Macro_SubscriptionItem.pm
deleted file mode 100644
index 57983c961..000000000
--- a/lib/WebGUI/i18n/English/Macro_SubscriptionItem.pm
+++ /dev/null
@@ -1,38 +0,0 @@
-package WebGUI::i18n::English::Macro_SubscriptionItem;
-use strict;
-
-our $I18N = {
-
- 'macroName' => {
- message => q|Subscription Item|,
- lastUpdated => 1128919093,
- },
-
- 'subscription item title' => {
- message => q|Subscription Item Macro Template Variables|,
- lastUpdated => 1184712144,
- },
-
- 'url' => {
- message => q|The URL to purchase a subscription to this item.|,
- lastUpdated => 1149217400,
- },
-
- 'name' => {
- message => q|The name of the item.|,
- lastUpdated => 1149217400,
- },
-
- 'description' => {
- message => q|The description of the item.|,
- lastUpdated => 1149217400,
- },
-
- 'price' => {
- message => q|The price of the item.|,
- lastUpdated => 1149217400,
- },
-
-};
-
-1;
diff --git a/lib/WebGUI/i18n/English/ProductManager.pm b/lib/WebGUI/i18n/English/ProductManager.pm
deleted file mode 100644
index b6b15b277..000000000
--- a/lib/WebGUI/i18n/English/ProductManager.pm
+++ /dev/null
@@ -1,435 +0,0 @@
-package WebGUI::i18n::English::ProductManager;
-use strict;
-
-our $I18N = {
- 'confirm delete product' => {
- message => q|Are you certain you wish to delete this product?|,
- lastUpdated => 0,
- context => q|displayed when deleting a product|
- },
- 'manage products' => {
- message => q|Products (beta)|,
- lastUpdated => 0,
- context => q|The admin console label of the product manager.|
- },
- 'title' => {
- message => q|Title|,
- lastUpdated => 1101772584,
- context => q|The form label for the title field in editProduct|
- },
- 'description' => {
- message => q|Description|,
- lastUpdated => 1101772584,
- context => q|The form label for the description field in editProduct|
- },
- 'price' => {
- message => q|Price|,
- lastUpdated => 1101772584,
- context => q|The form label for the price field in editProduct|
- },
- 'weight' => {
- message => q|Weight|,
- lastUpdated => 1101772584,
- context => q|The form label for the weight field in editProduct|
- },
- 'sku' => {
- message => q|SKU|,
- lastUpdated => 1101772584,
- context => q|The form label for the SKU (Stock Keeping Unit) field in editProduct|
- },
- 'template' => {
- message => q|Template|,
- lastUpdated => 1101772584,
- context => q|The form label for the template field in editProduct|
- },
- 'edit product' => {
- message => q|Edit product|,
- lastUpdated => 1101772584,
- context => q|The name of the edit product form|
- },
-
- 'edit product title error' => {
- message => q|You must enter a product title.|,
- lastUpdated => 1101772584,
- context => q|An errormessage when no product title is given.|
- },
- 'edit product price error' => {
- message => q|You must enter a price.|,
- lastUpdated => 1101772584,
- context => q|An errormessage when no product price is given.|
- },
- 'edit product weight error' => {
- message => q|You must enter a weight.|,
- lastUpdated => 1101772584,
- context => q|An errormessage when no product weight is given.|
- },
- 'edit product sku error' => {
- message => q|You must enter a SKU|,
- lastUpdated => 1101772584,
- context => q|An error message when no product SKU is given.|
- },
- 'edit parameter name' => {
- message => q|Name|,
- lastUpdated => 0000,
- context => q|The form label for the name field in editProductParameter|
- },
- 'edit parameter' => {
- message => q|Edit product parameter|,
- lastUpdated => 0000,
- context => q|The name of the editProductParameter form|
- },
- 'edit parameter name error' => {
- message => q|You must enter a parameter name.|,
- lastUpdated => 0000,
- context => q|An errormessage when no parameter name is given.|
- },
- 'edit parameter productId error' => {
- message => q|No product ID supplied.|,
- lastUpdated => 0000,
- context => q|An errormessage when no productId for a parameter is given.|
- },
- 'edit option value' => {
- message => q|Value|,
- lastUpdated => 0000,
- context => q|The form label for the value field in editProductParameterOption|
- },
- 'edit option price modifier' => {
- message => q|Price modifier|,
- lastUpdated => 0000,
- context => q|The form label for the priceModifier field in editProductParameterOption|
- },
- 'edit option weight modifier' => {
- message => q|Weight modifier|,
- lastUpdated => 0000,
- context => q|The form label for the weightModifier field in editProductParameterOption|
- },
- 'edit option sku modifier' => {
- message => q|SKU modifier|,
- lastUpdated => 0000,
- context => q|The form label for the skuModifier field in editProductParameterOption|
- },
- 'edit option' => {
- mesaage => q|Edit parameter option|,
- lastUpdated => 0000,
- context => q|The name of the edit parameter option form|
- },
- 'edit option value error' => {
- message => q|You must enter a value.|,
- lastupdated => 0000,
- context => q|An error message when no value for an option is given.|
- },
- 'edit option parameterId error' => {
- message => q|No parameter ID given.|,
- lastUpdated => 0000,
- context => q|An error message when no parameterId for a parameter is given.|
- },
- 'list products' => {
- message => q|List products|,
- lastUpdated => 0000,
- context => q|The title of the list product screen|
- },
- 'add product' => {
- message => q|Add a new product|,
- lastUpdated => 0,
- context => q|The label for the add product link in de productmanager menu.|
- },
- 'list products' => {
- message => q|List products|,
- lastUpdated => 0,
- context => q|The label for the list products link in de productmanager menu.|
- },
- 'manage product' => {
- message => q|Manage product|,
- lastUpdated => 0,
- context => q|The label for the manage product link in de productmanager menu.|
- },
- 'list variants' => {
- message => q|List variants|,
- lastUpdated => q|List variants|,
- context => q|The label for the list variants in de productmanager menu.|
- },
- 'sku template' => {
- message => q|SKU Template|,
- lastUpdated => 0,
- context => q|The label for the sku template field in the edit product screen.|
- },
- 'edit sku composition label' => {
- message => q|Edit SKU Composition|,
- lastUpdated => 0,
- context => q|The label of the edit sku composition|
- },
- 'list variants label' => {
- message => q|List product variants|,
- lastUpdated => 0,
- context => q|The label of the list variants screen.|
- },
- 'available' => {
- message => q|Available|,
- lastUpdated => 0,
- context => q|A message indicating that a variant is available.|
- },
- 'variant ID' => {
- message => q|variantId|,
- lastUpdated => 1118937717,
- },
- 'parameter ID' => {
- message => q|parameterId|,
- lastUpdated => 1118937717,
- },
- 'option ID' => {
- message => q|optionId|,
- lastUpdated => 1118937717,
- },
- 'properties' => {
- message => q|Properties|,
- lastUpdated => 0,
- context => q|Properties|
- },
- 'add parameter' => {
- message => q|Add parameter|,
- lastUpdated => 0,
- context => q|The label of the add parameter link in manage product.|
- },
- 'add option' => {
- message => q|Add option|,
- lastUpdated => 0,
- context => q|The label of the add option link in manage product.|
- },
- 'manage product label' => {
- message => q|Manage product|,
- lastUpdated => 0,
- context => q|The label of the manage product screen.|
- },
- 'price override' => {
- message => q|Price override|,
- lastUpdated => 0,
- context => q|Form label in the edit variant screen.|
- },
- 'weight override' => {
- message => q|Weight override|,
- lastUpdated => 0,
- context => q|Form label in the edit variant screen.|
- },
- 'sku override' => {
- message => q|SKU override|,
- lastUpdated => 0,
- context => q|Form label in the edit variant screen.|
- },
- 'edit variant' => {
- message => q|Edit product variant|,
- lastUpdated => 0,
- context => q|Label of the edit variant screen.|
- },
-
- 'title description' => {
- message => q|The name of the product.|,
- lastUpdated => 1120449422,
- },
-
- 'description description' => {
- message => q|A description of the product.|,
- lastUpdated => 1120449422,
- },
-
- 'price description' => {
- message => q|The default price of the product.|,
- lastUpdated => 1120449422,
- },
-
- 'useSalesTax' => {
- message => q|Use Sales Tax?|,
- lastUpdated => 1159844899,
- },
-
- 'useSalesTax description' => {
- message => q|Should this product have sales tax applied to it?|,
- lastUpdated => 1159844899,
- },
-
- 'weight description' => {
- message => q|The default weight of the product.|,
- lastUpdated => 1120449422,
- },
-
- 'sku description' => {
- message => q|The base SKU of the product.|,
- lastUpdated => 1120449422,
- },
-
- 'template description' => {
- message => q|The default template associated with product.|,
- lastUpdated => 1120449422,
- },
-
- 'sku template description' => {
- message => q|This field defines how the SKU for each
-product variant will be composed. The syntax is the same as that of
-normal templates.|,
- lastUpdated => 1120449422,
- },
-
- 'edit parameter name description' => {
- message => q|
The name of this parameter.
|,
- lastUpdated => 1122609059,
- },
-
- 'edit option value description' => {
- message => q|The value of this option (ie. 'Blue').
|,
- lastUpdated => 1122609417,
- },
-
- 'edit option price modifier description' => {
- message => q|The amount this option adds to the
-default price for product variants containig this option.
|,
- lastUpdated => 1146606364,
- },
-
- 'edit option weight modifier description' => {
- message => q|The weight this option adds to the
-default weight for product variants consisting of this option.
|,
- lastUpdated => 1122609417,
- },
-
- 'edit option sku modifier description' => {
- message => q|When this option is called in the SKU template as a template variable, the value that will be displayed.
|,
- lastUpdated => 1165513384,
- },
-
- 'price override description' => {
- message => q|The price for this variant.|,
- lastUpdated => 1165513644,
- },
-
- 'weight override description' => {
- message => q|The weight of this variant.|,
- lastUpdated => 1165513603,
- },
-
- 'sku override description' => {
- message => q|The SKU of this variant.|,
- lastUpdated => 1165513642,
- },
-
- 'available description' => {
- message => q|This sets whether this variant is available for purchase.|,
- lastUpdated => 1146607104,
- },
-
- 'help edit sku template title' => {
- message => q|Edit SKU template|,
- lastUpdated => 0,
- context => q|The title of the edit sku template help page|
- },
- 'help edit sku template body' => {
- message => q|The SKU template defines how the SKU for each product variant will be
-composed. Since parameters are components of the SKU template you'll
-probably want to change the SKU template when you add a parameter. This
-is the place to do this. Note that you can also edit the SKU template
-through the properties of the product.
-
-The syntax is the same as that of normal templates. Available
-template variables are:
-
-<tmpl_var base>
-The default SKU defined above.
-
-
-<tmpl_var param.MyParameterName>
-
-For each parameter a template variable
-of this format is generated. Spaces in the parameter name are converted
-to dots. For example if you have defined a parameter called 'Color' its
-template variable is called <tmpl_var
-param.color>. If you have defined a parameter with name
-'Number of pins' the template variable containing its SKU modifier is
-called <tmpl_var
-param.number.of.pins>.
-
-
-The complete list of available template variables is also printed above
-the form.
|,
- lastUpdated => 1164742227,
- context => q|The body of the edit sku template help page|
- },
-
- 'topicName' => {
- message => q|Product Manager|,
- lastUpdated => 1128919931,
- },
-
-
- 'group id' => {
- message => "Add to Group",
- lastUpdated => 0,
- context => "Label for add to group action",
- },
-
- 'group id description' => {
- message => "Add purchasers of this product to this group. Set to 'everyone' to disable.",
- lastUpdated => 0,
- context => "Hover help for add to group action",
- },
-
- 'group expires offset' => {
- message => "Group Expires Offset",
- lastUpdated => 0,
- context => "Label for group expires offset",
- },
-
- 'group expires offset description' => {
- message => "Length of time added to user's expiration from the above group each time this product is purchased.",
- lastUpdated => 0,
- context => "Hover help for group expires offset",
- },
-
-
- '6 months' => {
- message => "6 months",
- lastUpdated => 0,
- context => "A time period for group expires offset",
- },
- '1 year' => {
- message => "1 year",
- lastUpdated => 0,
- context => "A time period for group expires offset",
- },
- '1 month' => {
- message => "1 month",
- lastUpdated => 1160615577,
- context => "A time period for group expires offset",
- },
- '2 years' => {
- message => "2 years",
- lastUpdated => 0,
- context => "A time period for group expires offset",
- },
- '3 years' => {
- message => "3 years",
- lastUpdated => 0,
- context => "A time period for group expires offset",
- },
- '5 years' => {
- message => "5 years",
- lastUpdated => 0,
- context => "A time period for group expires offset",
- },
- '10 years' => {
- message => "10 years",
- lastUpdated => 0,
- context => "A time period for group expires offset",
- },
- 'lifetime' => {
- message => "lifetime",
- lastUpdated => 0,
- context => "A time period for group expires offset",
- },
-
- 'productId' => {
- message => "Product ID",
- lastUpdated => 0,
- context => "Unique identifier for a Product",
- },
-
-};
-
-1;
diff --git a/lib/WebGUI/i18n/English/Subscription.pm b/lib/WebGUI/i18n/English/Subscription.pm
deleted file mode 100755
index 2b73a21c8..000000000
--- a/lib/WebGUI/i18n/English/Subscription.pm
+++ /dev/null
@@ -1,387 +0,0 @@
-package WebGUI::i18n::English::Subscription;
-use strict;
-
-our $I18N = {
- 'expire subscription codes' => {
- message => q|Expire Subscription Codes|,
- lastUpdated => 0,
- context => q|the title of the expire subscription codes workflow activity|
- },
-
- 'no subscription code batches' => {
- message => q|No subscription code batches have been created yet. Use the submenu on the right to generate a batch.|,
- lastUpdated => 1101228391,
- context => q|Displayed if no subscription code batches have been created|
- },
-
- 'listSubscriptionCodes title' => {
- message => q|Manage Subscription Codes|,
- lastUpdated => 1101228391,
- context => q|Title of listSubscriptionCodes.|
- },
-
- 'batch id' => {
- message => q|BatchId|,
- lastUpdated => 1101228391,
- context => q|Shows up in the table header in listSubscriptionCodes.|
- },
-
- 'subscription description' => {
- message => q|Description|,
- lastUpdated => 1101228391,
- context => q|Form label in editSubscription|
- },
-
- 'manage codes' => {
- message => q|Manage subscription codes|,
- lastUpdated => 1101228391,
- context => q|A submenu option in the Subscriptions Admin Console menu.|
- },
-
- 'delete subscription confirm' => {
- message => q|Are you sure to delete this subscription?|,
- lastUpdated => 1101754598,
- context => q|Confirmation question when deleting a subscription.|
- },
-
- 'subscriptionId' => {
- message => q|Subscription Id|,
- lastUpdated => 1101228391,
- context => q|Just leave it Subscription Id.|
- },
-
- 'generate batch' => {
- message => q|Generate a batch of subscription codes|,
- lastUpdated => 1101228391,
- context => q|A submenu option in the Subscriptions Admin Console menu.|
- },
-
- 'subscription name' => {
- message => q|Subscription name|,
- lastUpdated => 1101228391,
- context => q|Form label in editSubscription|
- },
-
- 'code' => {
- message => q|Code|,
- lastUpdated => 1101228391,
- context => q|Shows up in the table header in listSubscriptionCodes.|
- },
-
- 'code description' => {
- message => q|The subscription code that you want to redeem|,
- lastUpdated => 1101228391,
- },
-
- 'delete batch confirm' => {
- message => q|Are you sure to delete this batch?|,
- lastUpdated => 1101228391,
- context => q|Confirmation question when deleting a code batch.|
- },
-
- 'selection used' => {
- message => q|date of usage between|,
- lastUpdated => 1101228391,
- context => q|Shows up in the selection part of listSubscriptionCodes.|
- },
-
- 'batch description' => {
- message => q|Batch description|,
- lastUpdated => 1101228391,
- context => q|Form option in createSubscriptionCodeBatch.|
- },
-
- 'redeem code' => {
- message => q|Redeem a subscription code.|,
- lastUpdated => 1101228391,
- context => q|The title of the URL in displayLogin that points to code redemption.|
- },
-
- 'selection message' => {
- message => q|You can make a selection of codes by:|,
- lastUpdated => 1101228391,
- context => q|Shows up in the selection part of listSubscriptionCodes.|
- },
-
- 'subscription name description' => {
- message => q|Name of the subscription.
|,
- lastUpdated => 1120861450,
- },
-
- 'subscription price description' => {
- message => q|Price to pay for the subscription.
|,
- lastUpdated => 1120861450,
- },
-
- 'useSalesTax' => {
- message => q|Use Sales Tax?|,
- lastUpdated => 1159845025,
- },
-
- 'useSalesTax description' => {
- message => q|Should this subscription have sales tax applied to it?|,
- lastUpdated => 1159845045,
- },
-
- 'subscription description description' => {
- message => q|Detailed description of the subscription.
|,
- lastUpdated => 1120861450,
- },
-
- 'subscription group description' => {
- message => q|When a user paid the fee, he/she will be added to this group.
|,
- lastUpdated => 1167190387,
- },
-
- 'subscription duration description' => {
- message => q|This sets the length of one subscription term. ie. You pay every month, or every half year.
|,
- lastUpdated => 1120861450,
- },
-
- 'execute on subscription description' => {
- message => q|A (Perl) script to call when someone has subscribed and paid.
|,
- lastUpdated => 1167190394,
- },
-
- 'subscription karma description' => {
- message => q|The amount of karma which is added to the user after he/she subscribes.
|,
- lastUpdated => 1120861450,
- },
-
- 'codes expire' => {
- message => q|Codes expire after|,
- lastUpdated => 1101228392,
- context => q|Form option in createSubscriptionCodeBatch.|
- },
-
- 'no association error' => {
- message => q|You have to associate this batch to at least one subscription.|,
- lastUpdated => 1101228391,
- context => q|An error that cab occur when creating a code batch.|
- },
-
- 'subscription duration' => {
- message => q|Subscription period|,
- lastUpdated => 1101228391,
- context => q|Form label in editSubscription|
- },
-
- 'creation date' => {
- message => q|Creation date|,
- lastUpdated => 1101228391,
- context => q|Shows up in the table header in listSubscriptionCodes.|
- },
-
- 'and' => {
- message => q|and|,
- lastUpdated => 1101228391,
- context => q|Shows up in the selection part of listSubscriptionCodes.|
- },
-
- 'subscription group' => {
- message => q|Subscribe to group|,
- lastUpdated => 1101228391,
- context => q|Form label in editSubscription|
- },
-
- 'manage subscriptions' => {
- message => q|Subscriptions (beta)|,
- lastUpdated => 1101228391,
- context => q|A submenu option in the Subscriptions Admin Console menu.|
- },
-
- 'execute on subscription' => {
- message => q|Execute on subscription|,
- lastUpdated => 1101228391,
- context => q|Form label in editSubscription|
- },
-
- 'status' => {
- message => q|Status|,
- lastUpdated => 1101228391,
- context => q|Shows up in the table header in listSubscriptionCodes.|
- },
-
- 'noc' => {
- message => q|Number of codes in batch|,
- lastUpdated => 1101228391,
- context => q|Form option in createSubscriptionCodeBatch.|
- },
-
- 'selection created' => {
- message => q|date of creation between|,
- lastUpdated => 1101228391,
- context => q|Shows up in the selection part of listSubscriptionCodes.|
- },
-
- 'manage batches' => {
- message => q|Manage subscription code batches|,
- lastUpdated => 1101228391,
- context => q|A submenu option in the Subscriptions Admin Console menu.|
- },
-
- 'association' => {
- message => q|Associate with subscription|,
- lastUpdated => 1101228391,
- context => q|Form option in createSubscriptionCodeBatch.|
- },
-
- 'no description error' => {
- message => q|You must enter a description.|,
- lastUpdated => 1101228391,
- context => q|An error that cab occur when creating a code batch.|
- },
-
- 'subscription price' => {
- message => q|Price|,
- lastUpdated => 1101228391,
- context => q|Form label in editSubscription|
- },
-
- 'dateUsed' => {
- message => q|Date of usage|,
- lastUpdated => 1101228391,
- context => q|Shows up in the table header in listSubscriptionCodes.|
- },
-
- 'create batch error' => {
- message => q|An error has occurred:|,
- lastUpdated => 1101754822,
- context => q|Identifies an error in createSubscriptionCodeBatch.|
- },
-
- 'select' => {
- message => q|Show selection|,
- lastUpdated => 1101228391,
- context => q|Shows up in the selection part of listSubscriptionCodes.|
- },
-
- 'edit subscription title' => {
- message => q|Edit Subscription|,
- lastUpdated => 1101228391,
- context => q|Form label in editSubscription|
- },
-
- 'add subscription' => {
- message => q|Add a new subscription|,
- lastUpdated => 1101228391,
- context => q|A submenu option in the Subscriptions Admin Console menu.|
- },
-
- 'list codes in batch' => {
- message => q|List the codes in this batch|,
- lastUpdated => 1101228391,
- context => q|In listSubscriptionCodeBatches|
- },
-
- 'delete codes' => {
- message => q|Delete selected codes|,
- lastUpdated => 1101228391,
- context => q|Shows up in listSubscriptionCodes.|
- },
-
- 'subscription karma' => {
- message => q|Karma|,
- lastUpdated => 1101228391,
- context => q|Form label in editSubscription|
- },
-
- 'create batch menu' => {
- message => q|Create a batch of subscription codes|,
- lastUpdated => 1101228391,
- context => q|Menu name for createSubscriptionCodeBatch.|
- },
-
- 'noc description' => {
- message => q|Number of codes to create
|,
- lastUpdated => 1120858265,
- },
-
- 'code length description' => {
- message => q|The number of characters in the generated codes. Codes must be at least 10
-characters long.
|,
- lastUpdated => 1120858265,
- },
-
- 'codes expire description' => {
- message => q|The code must be used before this date.
|,
- lastUpdated => 1132353871,
- },
-
- 'association description' => {
- message => q|Which subscription(s) are made with the generated codes.
|,
- lastUpdated => 1120858265,
- },
-
- 'batch description description' => {
- message => q|Description of the batch.|,
- lastUpdated => 1120858265,
- },
-
- 'no subscriptions' => {
- message => q|There are no subscriptions yet. You can add subscriptions by using the 'Add Subscription' option in the menu on the right of the screen.|,
- lastUpdated => 0,
- context => q|A message that shows up in manage subscriptions indicating that there are no subscriptions at all.|
- },
-
- 'redeem code success' => {
- message => q|You've successfully subscribed to the subscriptions. You can enter another code below.|,
- lastUpdated => 0,
- context => q|The success message for the code redemption function.|
- },
- 'redeem code failure' => {
- message => q|You've entered a code that's wrong, already being used or expired. Please enter another code below.|,
- lastUpdated => 1101754837,
- context => q|The failure message for the code redemption function.|
- },
- 'redeem code ask for code' => {
- message => q|Please enter your subscription code below.|,
- lastUpdated => 0,
- context => q|The enter a code message for the code redemption function.|
- },
- 'selection batch id' => {
- message => q|batch ID|,
- lastUpdated => 0,
- context => q|Shows up in the selection part of listSubscriptionCodes.|
- },
-
- 'help redeem code template body' => {
- message => q|The following template variables are available through this template:
-
-batchDescription
-The description of the batch tied to the subscription code.
-
-message
-The message that gives the result of your action. Depending on what you've done it says that you can enter a code, you've entered the wrong code, or you've successfully redeemed your code.
-
-codeForm
-The form in which the user can enter his subscription code.
|,
- lastUpdated => 1146593261,
- context => q|The body of the help page of the code redemption template.|
- },
-
- 'help redeem code template title' => {
- message => q|Redeem subscription code template|,
- lastUpdated => 1101754848,
- context => q|The title of the help page of the code redemption template.|
- },
-
- 'code length' => {
- message => q|Subscription code length|,
- lastUpdated => 1102660410,
- context => q|The label of the form field in which the length of a subscription code is entered.|
- },
- 'code length error' => {
- message => q|You must enter a subscription code length between 10 and 64 (border values included).|,
- lastUpdated => 0,
- context => q|The error message that shows up when a wrong code length is specified.|
- },
-
- 'topicName' => {
- message => q|Subscriptions|,
- lastUpdated => 1128920064,
- },
-
-};
-
-1;