Add a continue shopping url to the Donation, Product, FlatDiscount and Subscription

Sku's.  Update all the templates to display this URL.  The new url takes the
user back to the view method with no extra variables set (like hasAddedToCart).
This commit is contained in:
Colin Kuskie 2008-07-16 01:05:06 +00:00
parent aa28c0a04c
commit 3e2d5c6adf
17 changed files with 37 additions and 2 deletions

View file

@ -12,6 +12,9 @@
- fixed: edit branch only changes meta data fields if another value is changed
- fixed: Gallery reverts to undeletable bare asset if created with default
view "Single Album"
- fixed: The Sku's, Donation, Product, Subscription and FlatDiscount have a
continue shopping url that will take the user back the Sku in its normal
mode.
7.5.16
- Created a migration from 7.4.40 directly to 7.5.16.

View file

@ -155,6 +155,7 @@ sub view {
donateButton => WebGUI::Form::submit( $session, { value => $i18n->get("donate button") }),
priceField => WebGUI::Form::float($session, { name => "price", defaultValue => $self->getPrice }),
hasAddedToCart => $self->{_hasAddedToCart},
continueShoppingUrl => $self->getUrl,
);
return $self->processTemplate(\%var,undef,$self->{_viewTemplate});
}

View file

@ -233,6 +233,7 @@ sub view {
formFooter => WebGUI::Form::formFooter($session),
addToCartButton => WebGUI::Form::submit( $session, { value => $i18n->get("add to cart") }),
hasAddedToCart => $self->{_hasAddedToCart},
continueShoppingUrl => $self->getUrl,
);
$var{alreadyHasCoupon} = $self->hasCoupon();

View file

@ -1583,8 +1583,9 @@ sub view {
$var{'addvariant_label'} = $i18n->get('add a variant');
$var{'canEdit'} = 1;
}
$var{variant_loop} = \@variantLoop;
$var{hasAddedToCart} = $self->{_hasAddedToCart};
$var{variant_loop} = \@variantLoop;
$var{hasAddedToCart} = $self->{_hasAddedToCart};
$var{continueShoppingUrl} = $self->getUrl;
my $out = $self->processTemplate(\%var,undef,$self->{_viewTemplate});
if (!$self->session->var->isAdminOn && $self->get("cacheTimeout") > 10) {

View file

@ -504,6 +504,7 @@ sub view {
formFooter => WebGUI::Form::formFooter($session),
purchaseButton => WebGUI::Form::submit( $session, { value => $i18n->get("purchase button") }),
hasAddedToCart => $self->{_hasAddedToCart},
continueShoppingUrl => $self->getUrl,
codeControls => join (' · ', (
'<a href="'.$self->getUrl('func=createSubscriptionCodeBatch') .'">'.$i18n->get('generate batch').'</a>',
'<a href="'.$self->getUrl('func=listSubscriptionCodes') .'">'.$i18n->get('manage codes').'</a>',

View file

@ -24,6 +24,7 @@ our $HELP = {
{ name => "hasAddedToCart" , required=>1 },
{ name => "thankYouMessage", description=>"thank you message help" },
{ name => "defaultPrice", description=>"default price help" },
{ name => "continueShoppingUrl" },
{ name => "templateId", description=>"donation template help" },
],
related => [

View file

@ -27,6 +27,7 @@ our $HELP = {
{ name => "hasAddedToCart" , required=>1 },
{ name => "thankYouMessage", description=>"thank you message help" },
{ name => "alreadyHasCoupon" },
{ name => "continueShoppingUrl" },
],
related => [
],

View file

@ -64,6 +64,7 @@ our $HELP = {
{ 'name' => 'buy_form_footer' },
{ 'name' => "hasAddedToCart" , required=>1 },
{ 'name' => "thankYouMessage", description=>"thank you message help" },
{ 'name' => "continueShoppingUrl" },
{ 'name' => 'addspecification_url' },
{ 'name' => 'addspecification_label' },
{ 'name' => 'specification_loop',

View file

@ -21,6 +21,7 @@ our $HELP = {
{ name => 'formFooter' , required=>1 },
{ name => 'purchaseButton' , required=>1 },
{ name => 'hasAddedToCart' , required=>1 },
{ name => 'continueShoppingUrl' },
{ name => 'codeControls' , required=>1 },
{ name => 'thankYouMessage', description=>'thank you message help' },
{ name => 'redeemCodeLabel' , required=>1 },

View file

@ -87,6 +87,12 @@ our $I18N = {
context => q|help for default price field|
},
'continueShoppingUrl' => {
message => q|A URL to reset the Product so that the user can continue shopping.|,
lastUpdated => 0,
context => q|template variable|
},
'assetName' => {
message => q|Donation|,
lastUpdated => 0,

View file

@ -123,6 +123,12 @@ our $I18N = {
context => q|template variable|
},
'continueShoppingUrl' => {
message => q|A URL to reset the Product so that the user can continue shopping.|,
lastUpdated => 0,
context => q|template variable|
},
};
1;

View file

@ -835,6 +835,12 @@ be useful, others may not.|,
context => q|template variable|
},
'continueShoppingUrl' => {
message => q|A URL to reset the Product so that the user can continue shopping.|,
lastUpdated => 0,
context => q|template variable|
},
};
1;

View file

@ -490,6 +490,12 @@ The form in which the user can enter his subscription code.<br />|,
context => q|template variable|
},
'continueShoppingUrl' => {
message => q|A URL to reset the Product so that the user can continue shopping.|,
lastUpdated => 0,
context => q|template variable|
},
};
1;