Creating Custom Designs for Categories and Products

From AVACTIS : Ecommerce Shopping Cart Software Wiki
Jump to: navigation, search

With Avactis Shopping Cart you can create unique custom designs for pages displaying individual products or lists of products and/or subcategories, for any category of an ecommerce storefront.

Below you will find some examples showing how to create custom designs for a selected product and for the list of products and subcategories of a selected category.

Custom Category Page Design

When you select a product category in the catalog, the list of products and subcategories of that category is displayed. Avactis Shopping Cart allows you to create any custom design for the list of products and subcategories, for any given category.

To do this, in the file Avactis-layouts/storefront-layout.ini, in section [ProductList], use the directive Categories {} and specify category ID(s) in the braces.

Here is an example of using the directive Categories {}:

[ProductList]
Default = product_list.php
Categories{3+} = product_list_dvd.php
Categories{5,8,12} = product_list_books.php
Categories{7} = product_list_electronics_new.php
Categories{7+} = product_list_electronics.php


The statement in line "Categories {3+}" specifies that the layout product_list_dvd.php will be used for the root category with ID=3 and all its subcategories.


The statement in line "Categories {5,8,12}" specifies that the layout product_list_books.php will be used for root categories with IDs equal to 5, 8 or 12.

Both "Categories {7}" and "Categories {7+}" are present in the file at the same time. This means that product_list_electronics_new.php will be used for the root category with ID=7,but for all its subcategories the specified layout is product_list_electronics.php. If the string Categories {7} wasn't there, then the instruction for Categories {7+} would be applied to the root category with ID=7.

For all other categories the layout is specified as product_list.php.


Custom Product Page Design

Example of section [ProductInfo]:

Default = product_info.php
Categories{3} = product-info-dvd.php
Categories{4,6} = product-info-CD.php
Categories{7+} = product-info-electronics.php
Categories{9} = product-info-books_new.php
Categories{9+} = product-info-books.php
Products{1} = product-id-1.php
Products{2,5,8} = product-id-2-5-8.php

The statement in line Categories {3} specifies that the product info layout product_info_dvd.php will be used for all products in the root category with ID=3.

The statement in line Categories{4,6} specifies that the product info layout product-info-CD.php will be used for all products in the root categories with ID=4 or 6.

The statement in line Categories{7+} specifies that the product info layout product-info-electronics.php will be used for all products in the root category with ID=7 and all its subcategories.

The lines Categories{9} and Categories{9+} are included in the file at the same time. This means that the product info layout product-info-books_new.php will be used for all products in the root category with ID=9, but all products in its subcategories will be displayed according to the layout product-info-books.php.

The statement in line Products{1} specifies that the product info layout product-id-1.php will be used for the product with ID=1. That is, this particular product will be displayed according to a distinctive detailed product description page.

The statement in line Products{2,5,8} specifies that that the product info layout product-id-2-5-8.php will be used for the products with ID=2, 5 or 8. These three products will be displayed according to a distinctive detailed product description page.