Zen Cart samples - parameters.xml file

This article has been archived for one of the following reasons:

  • It contains information that no longer applies, that is inaccurate, or that is duplicated in a current article.
  • It contains inaccurate or incomplete information and is being rewritten. We are working on new content and will replace this article when it’s ready.
  • Published on July 09, 2009 by stjacobs
  • Updated on February 08, 2012 by stjacobs

This is a sample parameters.xml file you can use when deploying Zen Cart on IIS. The file is annotated with comments that explain specific lines in the file you'll need to customize for your configuration.


Sample parameters.xml file


<parameters>
  <!-- Prompts where to copy the content files and takes a web site path (such as "contoso.com/app"). -->
  <parameter name="Application Path"
    description="Full site path you would like to install your application to(i.e. Default Web Site/zen-cart)."
    defaultValue="Default Web Site/zen-cart"
    tags="iisapp"
    >
    <parameterEntry
      type="ProviderPath"
      scope="iisapp"
      match="zen-cart"
      />
  </parameter> 

  <!-- This is the parameter that is used to set the ACL for the
  configuration file.  Note that the {Application Path} in the
  defaultValue below gets expanded to the Application Path entered
  by the user.  The name of this variable (in the {}s) matches the
  parameter name above.  The user is never prompted for this -
  the Web Deployment Tool has all it needs to generate this.
  -->
  <parameter 
    name="SetAclParameter1" 
    description="Sets the ACL on the configuration file" 
    defaultValue="{Application Path}/admin/includesconfiguration.php" 
    tags="Hidden"
    >
    <parameterEntry 
      type="ProviderPath" 
      scope="setAcl" 
      match="zen-cart/admin/includes/configuration.php"
      />
  </parameter>

  <parameter 
    name="SetAclParameter2" 
    description="Sets the ACL on the configuration file" 
    defaultValue="{Application Path}/includes/configuration.php" 
    tags="Hidden"
    >
    <parameterEntry 
      type="ProviderPath" 
      scope="setAcl" 
      match="zen-cart/includes/configuration.php"
      />
  </parameter>

  <parameter 
    name="SetAclParameter3" 
    description="Sets the ACL on the cache directory"
    defaultValue="{Application Path}/cache"
    tags="Hidden"
    >
    <parameterEntry 
      type="ProviderPath" 
      scope="setAcl" 
      match="zen-cart/cache$"
      />
  </parameter>

  <parameter 
    name="SetAclParameter4" 
    description="Sets the ACL on the images directory"
    defaultValue="{Application Path}/images"
    tags="Hidden"
    >
    <parameterEntry 
      type="ProviderPath" 
      scope="setAcl" 
      match="zen-cart/images$"
      />
  </parameter>

  <parameter 
    name="SetAclParameter5" 
    description="Sets the ACL on the includes/languages/english/html_includes directory"
    defaultValue="{Application Path}/includes/languages/english/html_includes"
    tags="Hidden"
    >
    <parameterEntry 
      type="ProviderPath" 
      scope="setAcl" 
      match="zen-cart/includes/languages/english/html_includes$"
      />
  </parameter>

  <parameter 
    name="SetAclParameter6" 
    description="Sets the ACL on the media directory"
    defaultValue="{Application Path}/media"
    tags="Hidden"
    >
    <parameterEntry 
      type="ProviderPath" 
      scope="setAcl" 
      match="zen-cart/media$"
      />
  </parameter>

  <parameter 
    name="SetAclParameter7" 
    description="Sets the ACL on the pub directory"
    defaultValue="{Application Path}/pub"
    tags="Hidden"
    >
    <parameterEntry 
      type="ProviderPath" 
      scope="setAcl" 
      match="zen-cart/pub$"
      />
  </parameter>

  <parameter 
    name="SetAclParameter8" 
    description="Sets the ACL on the admin/backups directory"
    defaultValue="{Application Path}/admin/backups"
    tags="Hidden"
    >
    <parameterEntry 
      type="ProviderPath" 
      scope="setAcl" 
      match="zen-cart/admin/backups$"
      />
  </parameter>

  <parameter 
    name="SetAclParameter9" 
    description="Sets the ACL on the admin/images/graphs directory"
    defaultValue="{Application Path}/admin/images/graphs"
    tags="Hidden"
    >
    <parameterEntry 
      type="ProviderPath" 
      scope="setAcl" 
      match="zen-cart/admin/images/graphs$"
      />
  </parameter>


  <!-- The data directory is the directory used by the application to
  store files.  The user of an application may want to change this
  so that the files are not stored in a well-known location
  NOTE: the second parameterEntry sets a value in the application's
  web.config file.  That file specifies the value here as a
  hidden segment, which means that the web server can't access
  it directly with an URL.  This prevents users from going directly
  to the files, rather than using the application to get them.
  The risk here is that if the user enters a value here that
  is the same as something that does require this value to be in the
  URL, it can impact the application.
  -->
  <!-- #Zen-Cart
  I'm leaving this in for illustrative purposes.  If you had a directory
  that needed an ACL, and the user could choose the path for it, then
  you would use a parameter like this.
  -->
  <!-- #Zen-Cart
  <parameter
    name="Data Directory"
    description="This is the directory that the Zen-Cart uses to store uploaded files"
    defaultValue="files"
    >
    <parameterEntry
      type="TextFile"
      scope="zen-cart\\configuration.php"
      match="PlaceHolderForFiles"
      />
    <parameterEntry
      type="TextFile"
      scope="\\web.config"
      match="PlaceHolderForFiles"
      />
  </parameter>
  -->

  <!-- Database Parameters
  The tags provided here tells the UI being used what type of parameter
  this is.  The UI can then construct an appropriate dialog for the
  database parameters, or fill them in if the user doesn't need to
  provide them
  -->

  <!-- This parameter prompts the user for the database server name.  
  Note that this parameter has only one parameterEntry element.
  This parameter is used with the configuration file and the
  connection string.  It is not used within the SQL script itself
  like the other paramters are.
  -->
  <parameter 
    name="Database Server" 
    description="Location of your database server (i.e., localhost, server name or IP address)" 
    defaultValue="localhost" 
    tags="MySQL, dbServer"
    >
    <!-- #Zen-Cart - not using this unless we start updating the config
    <parameterEntry
      type="TextFile"
      scope="zen-cart\\configuration.php"
      match="PlaceHolderForServer"
      />
    -->
  </parameter>

  <!-- This parameter prompts the user for the database name.  
  -->
  <parameter 
    name="Database Name" 
    description="Name of the database for your application." 
    defaultValue="zencart" 
    tags="MySQL, dbName"
    >
    <parameterEntry 
      type="TextFile" 
      scope="install.sql" 
      match="PlaceHolderForDb" 
      />
    <!-- #Zen-Cart - not using this unless we start updating the config
    <parameterEntry
      type="TextFile"
      scope="zen-cart\\configuration.php"
      match="PlaceHolderForDb"
      />
    -->
  </parameter>

  <!-- This parameter prompts the user for the database username.  
  -->
  <parameter 
    name="Database Username" 
    description="User name to access your application database." 
    defaultValue="zencartuser" 
    tags="MySQL, DbUsername"
    >
    <parameterEntry 
      type="TextFile" 
      scope="install.sql" 
      match="PlaceHolderForUser" 
      />
    <!-- #Zen-Cart - not using this unless we start updating the config
    <parameterEntry
      type="TextFile"
      scope="zen-cart\\configuration.php"
      match="PlaceHolderForUser"
      />
    -->
  </parameter>

  <!-- This parameter prompts the user for the database user's password.  
  -->
  <parameter 
    name="Database Password" 
    description="Password for the database username." 
    tags="New, Password, MySQL, DbUserPassword"
    >
    <parameterEntry 
      type="TextFile" 
      scope="install.sql" 
      match="PlaceHolderForPassword" 
      />
    <!-- #Zen-Cart - not using this unless we start updating the config
    <parameterEntry
      type="TextFile"
      scope="zen-cart\\configuration.php"
      match="PlaceHolderForPassword"
      />
    -->
  </parameter>

  <!-- Prompts for the admin creds and uses it for the administrator
  connection string. This is used to create a login and assign
  permissions. The MySQL tag indicates it is a parameter required for
  MySQL.
  The DbAdminUsername tag indicates it should be used when the user
  is creating a new database. If they're not, it can be filled in
  with the DbUsername value.  The UI should be able to figure out
  whether or not the user needs to be prompted for this.
  -->
  <parameter 
    name="Database Administrator" 
    description="Administrator user name for your database." 
    defaultValue="root" 
    tags="MySQL, DbAdminUsername"
    >
  </parameter>

  <!-- Prompts for the admin password and uses it for the administrator
  connection string.
  -->
  <parameter 
    name="Database Administrator Password" 
    description="Password for the database administrator account." 
    tags="Password, MySQL, DbAdminPassword"
    >
  </parameter>

  <!-- This is the hidden admin connection string used to run the
  database scripts.  Note that this connection string is just used
  here, and will probably be different from the connection string that
  is used by the application itself.
  -->
  <parameter 
    name="Connection String" 
    description="Automatically sets the connection string for the connection request." 
    defaultValue="Server={Database Server};Database={Database Name};uid={Database Administrator};Pwd={Database Administrator Password};" 
    tags="Hidden"
    >
    <parameterEntry 
      type="ProviderPath" 
      scope="dbmysql" 
      match="install.sql" 
      />
  </parameter>
</parameters>  

Submit article feedback

You must Log In to submit feedback.