Name

DiscountSpacesOn — enable "discount spaces" feature

SYNOPSIS

No | Yes

DESCRIPTION

This directive enables the "discount spaces" feature.

When DiscountSpacesOn is enabled, then on a per-page before-autoload basis, this routine initializes the current discount space to 'main', and then checks all CGI variables defined with the DiscountSpaceVar configuration directive to see if an alternate discount space has been specified.

When DiscountSpacesOn is not enabled, then the behavior is compatible to how it was before the feature was added to Interchange — all "discount space" functions become a no-operation; any attempts to specify an alternate discount space will have no effect, and will result in an error message in the catalog's error log.

See glossary entry discount for a complete discussion.

DIRECTIVE TYPE AND DEFAULT VALUE

Catalog directive

EXAMPLES

Example: Enabling DiscountSpacesOn

DiscountSpacesOn Yes

NOTES

AVAILABILITY

DiscountSpacesOn is available in Interchange versions:

4.6.0-5.9.0 (git-head)

SOURCE

Interchange 5.9.0:

Source: lib/Vend/Config.pm
Line 706

['DiscountSpacesOn', 'yesno',            'no'],

Source: lib/Vend/Config.pm
Line 5434 (context shows lines 5434-5446)

sub parse_yesno {
my($var, $value) = @_;
$_ = $value;
if (m/^y/i || m/^t/i || m/^1/ || m/^on/i) {
  return 1;
}
elsif (m/^n/i || m/^f/i || m/^0/ || m/^of/i) {
  return 0;
}
else {
  config_error("Use 'yes' or 'no' for the $var directive\n");
}
}

AUTHORS

Ethan Rowe

SEE ALSO

discount(7ic), DiscountSpaceVar(7ic)

DocBook! Interchange!