diff --git a/docs/upgrades/upgrade_6.5.5-6.6.0.pl b/docs/upgrades/upgrade_6.5.5-6.6.0.pl
new file mode 100644
index 000000000..67aa91879
--- /dev/null
+++ b/docs/upgrades/upgrade_6.5.5-6.6.0.pl
@@ -0,0 +1,29 @@
+#!/usr/bin/perl
+
+use lib "../../lib";
+use File::Path;
+use Getopt::Long;
+use strict;
+use WebGUI::Asset;
+use WebGUI::Session;
+use WebGUI::SQL;
+
+my $configFile;
+my $quiet;
+
+GetOptions(
+ 'configFile=s'=>\$configFile,
+ 'quiet'=>\$quiet
+);
+
+WebGUI::Session::open("../..",$configFile);
+
+#--------------------------------------------
+print "\tDeleting old templates\n" unless ($quiet);
+my $asset = WebGUI::Asset->newByDynamicClass("PBtmpl0000000000000035");
+$asset->purge;
+
+
+WebGUI::Session::close();
+
+
diff --git a/lib/WebGUI/Asset.pm b/lib/WebGUI/Asset.pm
index 26e9f0bb4..5132ea2f1 100644
--- a/lib/WebGUI/Asset.pm
+++ b/lib/WebGUI/Asset.pm
@@ -820,7 +820,7 @@ sub getAssetManagerControl {
$output .= "manager.assetType='".$controlType."';\n" if (defined $controlType);
$output .= "manager.disableDisplay(0);\n" if (defined $removeRank);
if ($controlType eq "ManageTrash" || $controlType eq "ManageClipboard") {
- #$output .= "manager.displayCrumbTrail = false;\n";
+ $output .= "manager.displayCrumbTrail = false;\n";
# $output .= "manager.sortEnabled = false;\n";
}
$output .= "manager.renderAssets();\n";
diff --git a/lib/WebGUI/Asset/Wobject/Navigation.pm b/lib/WebGUI/Asset/Wobject/Navigation.pm
index 7e78db640..8eeb6f80e 100644
--- a/lib/WebGUI/Asset/Wobject/Navigation.pm
+++ b/lib/WebGUI/Asset/Wobject/Navigation.pm
@@ -259,10 +259,10 @@ sub getToolbar {
sub view {
my $self = shift;
# we've got to determine what our start point is based upon user conditions
- my ($start,$current);
- if (!exists $session{asset}) {
- $start = $current = $self;
- } elsif ($self->get("startType") eq "specificUrl") {
+ my $start;
+ $session{asset} = WebGUI::Asset->newByUrl unless (exists $session{asset});
+ my $current = $session{asset};
+ if ($self->get("startType") eq "specificUrl") {
$start = WebGUI::Asset->newByUrl($self->get("startPoint"));
} elsif ($self->get("startType") eq "relativeToRoot") {
unless (($self->get("startPoint")+1) >= $self->getLineageLength) {
@@ -281,8 +281,7 @@ sub view {
$start = WebGUI::Asset->newByLineage($lineage);
}
}
- $current = $session{asset} unless (defined $current);
- $start = $session{asset} unless (defined $start); # if none of the above results in a start point, then the current page must be it
+ $start = $current unless (defined $start); # if none of the above results in a start point, then the current page must be it
my @includedRelationships = split("\n",$self->get("assetsToInclude"));
my %rules;
$rules{returnQuickReadObjects} = 1;
@@ -298,26 +297,22 @@ sub view {
$var->{'currentPage.url'} = $current->getUrl;
$var->{'currentPage.hasChild'} = $current->hasChildren;
my $currentLineage = $current->get("lineage");
- my @linesToSkip;
+ my $lineageToSkip = "noskip";
my $absoluteDepthOfLastPage;
foreach my $asset (@{$assets}) {
# skip pages we shouldn't see
- my $skip = 0;
my $pageLineage = $asset->get("lineage");
- foreach my $lineage (@linesToSkip) {
- $skip = 1 if ($pageLineage =~ m/^$lineage/);
- }
- next if ($skip);
+ next if ($pageLineage =~ m/^$lineageToSkip/);
if ($asset->get("isHidden") && !$self->get("showHiddenPages")) {
- push (@linesToSkip,$asset->get("lineage")) unless ($asset->get("lineage") eq "000001");
+ $lineageToSkip = $pageLineage unless ($pageLineage eq "000001");
next;
}
if ($asset->get("isSystem") && !$self->get("showSystemPages")) {
- push (@linesToSkip,$asset->get("lineage")) unless ($asset->get("lineage") eq "000001");
+ $lineageToSkip = $pageLineage unless ($pageLineage eq "000001");
next;
}
unless ($self->get("showUnprivilegedPages") || $asset->canView) {
- push (@linesToSkip,$asset->get("lineage")) unless ($asset->get("lineage") eq "000001");
+ $lineageToSkip = $pageLineage unless ($pageLineage eq "000001");
next;
}
my $pageData = {};
diff --git a/lib/WebGUI/Commerce/Payment/ITransact.pm b/lib/WebGUI/Commerce/Payment/ITransact.pm
index e598683e9..52b0942ff 100644
--- a/lib/WebGUI/Commerce/Payment/ITransact.pm
+++ b/lib/WebGUI/Commerce/Payment/ITransact.pm
@@ -5,6 +5,7 @@ use WebGUI::Session;
use WebGUI::HTMLForm;
use WebGUI::Commerce::Payment;
use WebGUI::Commerce::Item;
+use WebGUI::URL;
use Tie::IxHash;
use WebGUI::International;
use LWP::UserAgent;
@@ -208,7 +209,7 @@ sub configurationForm {
-value => '
'
);
$f->readOnly(
- -value => $i18n->get('extra info').'
'.$session{setting}{companyURL}.'?op=confirmRecurringTransaction&gateway='.$self->namespace
+ -value => $i18n->get('extra info').'
https://'.$session{config}{defaultSitename}.WebGUI::URL::getScriptURL().'?op=confirmRecurringTransaction&gateway='.$self->namespace
);
return $self->SUPER::configurationForm($f->printRowsOnly);
diff --git a/lib/WebGUI/Macro/SubscriptionItemPurchaseUrl.pm b/lib/WebGUI/Macro/SubscriptionItemPurchaseUrl.pm
index a907f2aa7..a86cf8822 100644
--- a/lib/WebGUI/Macro/SubscriptionItemPurchaseUrl.pm
+++ b/lib/WebGUI/Macro/SubscriptionItemPurchaseUrl.pm
@@ -6,7 +6,7 @@ use WebGUI::URL;
sub process {
my ($subscriptionId) = WebGUI::Macro::getParams(@_);
- return WebGUI::URL::page('op=purchaseSubscriptionItem&sid='.$subscriptionId);
+ return WebGUI::URL::page('op=purchaseSubscription&sid='.$subscriptionId);
}
1;
diff --git a/lib/WebGUI/Operation/Commerce.pm b/lib/WebGUI/Operation/Commerce.pm
index 63cec3356..4fdf0ff4f 100644
--- a/lib/WebGUI/Operation/Commerce.pm
+++ b/lib/WebGUI/Operation/Commerce.pm
@@ -12,6 +12,7 @@ use WebGUI::TabForm;
use WebGUI::Style;
use WebGUI::Commerce;
use WebGUI::Operation;
+use WebGUI::Operation::Shared;
use WebGUI::URL;
use WebGUI::International;
use WebGUI::Asset::Template;
@@ -55,7 +56,7 @@ sub www_cancelTransaction {
$var{message} = WebGUI::International::get('checkout canceled message', 'Commerce');
- return WebGUI::Asset::Template->new($session{setting}{commerceCheckoutCanceledTemplateId})->process(\%var);
+ return WebGUI::Operation::Shared::userStyle(WebGUI::Asset::Template->new($session{setting}{commerceCheckoutCanceledTemplateId})->process(\%var));
}
# This operation is here for easier future extensions to the commerce system.
@@ -74,7 +75,7 @@ sub www_checkoutConfirm {
# If the user isn't logged in yet, let him do so or have him create an account
if ($session{user}{userId} == 1) {
WebGUI::Session::setScratch('redirectAfterLogin', WebGUI::URL::page('op=checkout'));
- return WebGUI::Operation::execute('displayLogin');
+ return WebGUI::Operation::execute('auth');
}
# If no payment gateway has been selected yet, have the user do so now.
@@ -103,7 +104,7 @@ sub www_checkoutConfirm {
$var{form} = $f->print;
$var{title} = $i18n->get('checkout confirm title');
- return WebGUI::Asset::Template->new($session{setting}{commerceConfirmCheckoutTemplateId})->process(\%var);
+ return WebGUI::Operation::Shared::userStyle(WebGUI::Asset::Template->new($session{setting}{commerceConfirmCheckoutTemplateId})->process(\%var));
}
#-------------------------------------------------------------------
@@ -212,7 +213,7 @@ sub www_checkoutSubmit {
return WebGUI::Operation::execute('viewPurchaseHistory') unless ($checkoutError);
# If an error has occurred show the template errorlog
- return WebGUI::Asset::Template->new($session{setting}{commerceTransactionErrorTemplateId})->process(\%param);
+ return WebGUI::Operation::Shared::userStyle(WebGUI::Asset::Template->new($session{setting}{commerceTransactionErrorTemplateId})->process(\%param));
}
#-------------------------------------------------------------------
@@ -359,7 +360,7 @@ sub www_editCommerceSettingsSave {
}
}
- return WebGUI::Operation::execute('adminConsole');
+ return WebGUI::Operation::execute('editCommerceSettings');
}
#-------------------------------------------------------------------
@@ -400,13 +401,17 @@ sub www_selectPaymentGateway {
$i18n = WebGUI::International->new('Commerce');
$plugins = WebGUI::Commerce::Payment->getEnabledPlugins;
-
- foreach (@$plugins) {
- push(@pluginLoop, {
- name => $_->name,
- namespace => $_->namespace,
- formElement => WebGUI::Form::radio({name=>'paymentGateway', value=>$_->namespace})
- });
+ if (scalar(@$plugins) > 1) {
+ foreach (@$plugins) {
+ push(@pluginLoop, {
+ name => $_->name,
+ namespace => $_->namespace,
+ formElement => WebGUI::Form::radio({name=>'paymentGateway', value=>$_->namespace})
+ });
+ }
+ } else {
+ $session{form}{paymentGateway} = $plugins->[0]->namespace;
+ return WebGUI::Operation::execute("checkoutConfirm");
}
$var{pluginLoop} = \@pluginLoop;
@@ -417,7 +422,7 @@ sub www_selectPaymentGateway {
$var{formSubmit} = WebGUI::Form::submit({value=>$i18n->get('payment gateway select')});
$var{formFooter} = WebGUI::Form::formFooter;
- return WebGUI::Asset::Template->new($session{setting}{commerceSelectPaymentGatewayTemplateId})->process(\%var);
+ return WebGUI::Operation::Shared::userStyle(WebGUI::Asset::Template->new($session{setting}{commerceSelectPaymentGatewayTemplateId})->process(\%var));
}
#-------------------------------------------------------------------
diff --git a/lib/WebGUI/Operation/TransactionLog.pm b/lib/WebGUI/Operation/TransactionLog.pm
index b28542854..63cd8b1fe 100644
--- a/lib/WebGUI/Operation/TransactionLog.pm
+++ b/lib/WebGUI/Operation/TransactionLog.pm
@@ -28,7 +28,7 @@ sub www_viewPurchaseHistory {
$var{purchaseHistoryLoop} = \@historyLoop;
- return WebGUI::Asset::Template->new("PBtmpl0000000000000019")->process(\%var);
+ return WebGUI::Operation::Shared::userStyle(WebGUI::Asset::Template->new("PBtmpl0000000000000019")->process(\%var));
}
#-------------------------------------------------------------------
diff --git a/lib/WebGUI/i18n/English/CommercePaymentITransact.pm b/lib/WebGUI/i18n/English/CommercePaymentITransact.pm
index 261f193d3..adc9e10e9 100755
--- a/lib/WebGUI/i18n/English/CommercePaymentITransact.pm
+++ b/lib/WebGUI/i18n/English/CommercePaymentITransact.pm
@@ -156,8 +156,35 @@ See the information toward the bottom of this page to set up your merchant accou
Contact your hosting provider to install your certificate or install it yourself.
-Step 5: Optionally Accept eChecks
+Step 5: Enable IP Address
+For added security the system will not allow just anyone to post requests to the merchant account. We have to tell the merchant account what the IP address of our site (or sites) is. To do this go to your virtual terminal and log in. Go to Account Settings > Fraud Control > and click on the "IP Filter Settings" link. There enter the IP address of your server Set the status to Active and set the module to XML, then hit go. Contact your system administrator for your server IP address. You'll also need to send an email to support@cdgcommerce.com to let them know that you wish to enable the XML API.
+
+Step 6: Enable The Commerce System
+Set the enabled field to "Yes" in your WebGUI commerce settings.
+
+Step 7: Optionally Accept American Express, Discover, and Diners Club
+By default you'll only be able to accept MasterCard and Visa. If you want to accept others you'll need to follow these steps:
+
+Step 8: Optionally Accept eChecks
After you have your iTransact/CDGCommerce merchant account set up, you can optionally add the ability to accept eChecks by filling out this application.