The layout file

 

The layout file is the central point of Avactis storefront configuration. It has several important functions:

1.It defines the location of the storefront
2.It defines the location and names of actual files that comprise the storefront
3.It defines the web address of the storefront
4.It defines which parts of the storefront should be accessed over an HTTPS connection

The layout file is a plain-text file. It has a common format of an INI file: it is divided into sections and every section contains several settings. It can also contain comments: lines starting with a semicolon (;) are considered comments and are skipped by Avactis system.

The default installation of Avactis Shopping Cart includes a default layout file. It is located in the avactis-layouts directory and is named storefront-layout.ini. Settings in this file are automatically set to proper values by Avactis installation script; this ensures a proper functioning of the default storefront right after the installation. It's useful to study the default layout file and understand the principle of storefront functioning.

The following is the list of all possible sections and settings of the layout file.

[Site]

SiteURL = "http://www.mystore.com/"

The web address (URL) that customers should use to access the storefront. The purpose of this setting is for proper generation of all storefront links. All dynamic links (links to product pages, to search results etc.) will be generated beginning with this URL. For example, Avactis uses this setting to generate links to product pages in a data feed for Google Product Search. The trailing slash is required.

SitePath = "/home/joe/public_html/"

The absolute path, in the server filesystem, to the directory where the storefront files are located. This path is used as a base path: paths of files in all of the other settings are considered to be relative to this path. The trailing slash is required.

SiteHTTPSURL = "https://secure.mystore.com/"

Defines the web address (URL) that points to the storefront directory over an HTTPS connection. Most commonly it just adds a letter “s” to SiteURL, but sometimes it may be totally different. The URL should be obtained from the provider of the hosting service that Avactis is installed to.

Note that while the HTTP (insecure) and HTTPS (secure) URLs of the storefront may be different, they both must point to the same directory on the server—that which contains the storefront files.

[Templates]

TemplateDirectory = avactis-templates

The path to Avactis template directory. Avactis tags included in storefront files, when rendered, will search for their templates in this folder.


All the following sections specify the actual storefront file names.

Each section defines the filename of an existing file that will be used by Avactis system to perform a specific action.

All the sections should be present in the file, as well as all the settings inside these sections. However, it doesn't mean that every storefront file is mandatory; you can create a storefront without some of the files and specify already existing files as values for "missing" settings.

Each file can (and must, in order to work properly) contain any number of global Avactis tags. Local Avactis tags, however, will produce PHP errors. They should be used in templates only.

In order for Avactis Tags to work, each storefront file specified in the layout file should have the following Avactis initialization string as its very first string:

<?php include('init.php'); ?>

The first opening angle bracket should be the first symbol of the storefront file, there should be no spaces in front of it, otherwise the initialization will not work properly.

Any of the following sections of the storefront can be accessed over an HTTPS connection. To make a section secure, add the following setting to the corresponding section:

HTTPS = YES

Sections without this setting will be accessed over a simple (insecure) HTTP connection. Avactis will transit between HTTP and HTTPS automatically, according to these settings.


[ProductList]

This section specifies files that will display products from Avactis catalog in lists. These pages will be opened when your customer will select a category to see all available products within it.

Default = store.php

The file that will display the list of products if no category-specific files are defined for a category (see below).

The following sections are optional:

Categories { CID } = specials.php

The file that will display the list of products for category with ID specified in curly braces only. Category ID can be seen in the category list in Admin Area.

Categories { CID+ } = sale.php

The file that will display the list of products for category with ID specified in curly braces and all its subcategories (for the whole subcategory tree).

Categories { CID, CID+, CID ... } = women.php

You can specify several category IDs and the single specified storefront file will be used to display products from all of these categories and their subcategories if required.

[ProductInfo]

Default = product.php

The file that will show detailed information about a product selected by customer, if no product- or category-specific files has been defined (see below).

Categories { CID, CID+, CID ... } = women-product.php

The file that will display product information for any product in specified categories and, optionally, in its subcategories only.

Products { PID, PID, PID ... } = exclusive-product.php

The file that will display product information for products with specified IDs only.

[SearchResult]

Default = search.php

The file that will search Avactis catalog and display the products found.

[Cart]

Default = shopping-cart.php

The file that will display a list of products in a customer's shopping cart and will allow updating product quantity and remove individual products from the cart.

[Checkout]

Default = checkout.php

The file that will ask a customer for his billing & shipping information and will process his order.

[Closed]

Default = maintenance.php

The file that will display a message to store visitors if the store administrator closed the store via its Admin Area.

[Download]

Default = dl.php

The file that will carry out downloads of e-goods attached to ordered products. When a customer buys a product with e-goods attached, he gets an email message containing download links that point to this file.


All the following sections define the storefront files needed for user accounts functioning.

[Registration]

Default = register.php

The file that is opened when a customer wants to create an account at your store. This happens only if you enable customer account creation in Store Settings / Customer Account Settings.

[AccountActivation]

Default = activate.php

The file that activates an user account. When a customer creates an account at your store, and if you set Store Settings / Customer Account Settings / Account activation scheme to User-activated, the customer receives an email message with an activation link. The link points to this storefront file.

The activation itself is done automatically by the system at initialization time and you should only provide the resulting message (using the <?php MessageBox(); ?> tag).

[CustomerPersonalInfo]

Default = my-profile.php

If you enabled user accounts in your store, and your customers sign in, this file is opened when they want to change their personal information (name, address etc). So it's necessary to include the <?php CustomerPersonalInfo(); ?> tag in the file.

[CustomerOrdersHistory]

Default = my-orders.php

The file that will display a list of orders of a signed-in customer and will allow searching through it.

[CustomerOrderInfo]

Default = my-order.php

The file that will display information about a specific order that a signed-in customer has placed in the store.

[CustomerOrderInvoice]

Default = my-invoice.php

[CustomerOrderDownloadLinks]

Default = my-e-goods.php

[CustomerSignIn]

Default = signin.php

[CustomerNewPassword]

Default = my-new-password.php

[CustomerChangePassword]

Default = change-my-password.php

[CustomerForgotPassword]

Default = my-forgot-password.php

[CustomerAccountHome]

Default = my-account.php


  © 2004-2008 Pentasoft Corp. All Rights Reserved.