Akopia Akopia Services

[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date ][Minivend by thread ]

[mv] PATCH #2: Special vs. SpecialPage...



******    message to minivend-users from "Jeff Carnahan" <jcarnahan@networq.com>     ******

In addition to the patch I posted earlier, one more patch is necessary to
ensure that when Minivend looks up special pages, it uses the "SpecialPage"
directive *ONLY* to find what it needs:

*** Util-dist.pm	Mon Jul 24 15:46:15 2000
--- Util.pm	Mon Jul 24 16:21:29 2000
***************
*** 1210,1216 ****
  	my $dir = '';
  	$dir = "../$Vend::Cfg->{SpecialPageDir}/"
  		if $Vend::Cfg->{SpecialPageDir};
!     return $Vend::Cfg->{Special}{$key} || "$dir$key";
  }

  ## ERROR
--- 1210,1216 ----
  	my $dir = '';
  	$dir = "../$Vend::Cfg->{SpecialPageDir}/"
  		if $Vend::Cfg->{SpecialPageDir};
!     return $Vend::Cfg->{SpecialPage}{$key} || "$dir$key";
  }

  ## ERROR

I've been working on this inter-mixing of the "SpecialPages" and formerly
non-existent "Special" directive for the last few hours now and have some
advice/documentation updates that should clarify everything.

IMPORTANT NOTE: The following documentation applies ONLY if the patches
posted in my earlier email and this one are properly applied. MAKE SURE YOU
HAVE A BACKUP OF ALL THE AFFECTED MINIVEND FILES BEFORE APPLYING ANY
PATCHES.

The following should clarify what directive is for what:

SpecialPage:
  This directive is for defining various parsed HTML pages that
  deal with various error conditions. Minivend by default expects
  these pages to have various default names. This default behavior
  can be overridden by using this directive. For example:

  SpecialPage   missing    missing-page.html

  Will redefine the default "missing" special page, which Minivend
  assumes to be "missing.html" to be "missing-page.html". Note that
  the .html extension is the default and can be changed with the
  HTMLsuffix directive.

  FORMAT:
    SpecialPage    Special_Page_Name   New_Special_Page_Name

SpecialDir:
  The directory all special pages are assumed to be in. Minivend
  defaults this directory to be the "special_pages" directory
  inside the catalog's root directory. IMPORTANT NOTE:  This can
  not be set to an absolute path.

  FORMAT:
    SpecialDir     New_Relative_Special_Dir

Special:
  This directive allows default database names to be arbitrarily
  reassigned. By default, Minivend expects the salestax database
  to be named "salestax.asc" and inside the "products" directory
  in the catalog's root directory. (Note that the "products"
  directory can also be reassigned via the ProductDir directive.)
  Special allows the filename (or location) of this database and
  others to be changed. For Example:

  Special   salestax.asc    products/salestax.txt

  Would rename the default 'salestax.asc' database to
  'salestax.txt'. Note that the path is considered to be relative
  to the catalog root directory. The path can also be absolute,
  for example:

  Special   shipping.asc    /home/mvend/global-settings/shipping.txt

  By changing the default location/name of the "shipping.asc"
  database, you could implement a global shipping scheme.

  The Special directive can redefine the name of the
  "salestax.asc", shipping.asc" and "accessories.asc" databases.
  For Example:

  Special   salestax.asc    products/salestax.txt
  Special   shipping.asc    products/shipping.txt
  Special   accessories.asc products/accessories.txt

  FORMAT:
    Special   Old_Database_Name     New_Database_Location

    Where Old_Database_Name is one of the following:
      - salestax.asc
      - shipping.asc
      - accessories.asc

    New_Database_Location can be either a relative or absolute
    path. Relative paths are relative to the catalog root
    directory.


Again, the above documentation applies when the patches in both this email
and my earlier one are applied to Minivend 4.04a.

Note to Mike; perhaps the "Special" directive should be renamed to
"SpecialDatabase" for clarity?

--
Jeff Carnahan - jcarnahan@networq.com





-
To unsubscribe from the list, DO NOT REPLY to this message.  Instead, send
email with 'UNSUBSCRIBE minivend-users' in the body to Majordomo@minivend.com.
Archive of past messages: http://www.minivend.com/minivend/minivend-list


Search for: Match: Format: Sort by: