Add a template variable to tell if there is already one in the cart. Modify the default template to include the thank you message and to hide the add to cart button if this coupon is already in the cart.
37 lines
900 B
Perl
37 lines
900 B
Perl
package WebGUI::Help::Asset_FlatDiscount;
|
|
|
|
use strict;
|
|
|
|
|
|
our $HELP = {
|
|
'template' => {
|
|
|
|
title => 'flat discount coupon template',
|
|
body => 'flat discount coupon template help',
|
|
isa => [
|
|
{
|
|
tag => 'sku properties',
|
|
namespace => 'Asset_Sku',
|
|
},
|
|
],
|
|
fields => [
|
|
],
|
|
variables => [
|
|
{ name => "formHeader" , required=>1},
|
|
{ name => "formFooter" , required=>1 },
|
|
{ name => "addToCartButton" , required=>1 },
|
|
{ name => "mustSpend", description=>"must spend help" },
|
|
{ name => "percentageDiscount", description=>"percentage discount help" },
|
|
{ name => "priceDiscount", description=>"price discount help" },
|
|
{ name => "templateId", description=>"template help" },
|
|
{ name => "hasAddedToCart" , required=>1 },
|
|
{ name => "thankYouMessage", description=>"thank you message help" },
|
|
{ name => "alreadyHasCoupon" },
|
|
],
|
|
related => [
|
|
],
|
|
},
|
|
|
|
};
|
|
|
|
1;
|