Modular Storefront |
Top Previous Next |
By using the various content modules in AShop you can put together the front page of your shopping cart any way you like. The layout of the storefront is controlled with the template catalog.html which is found in the templates directory. These are the modules you can use and their corresponding placeholder codes:
Newsletter Module If you are using the integration with our Autoresponder-Service.com service, you can enable the newsletter module to let visitors sign up with your mailing list, which can of course be an autoresponder. You need to select the list you wish to use for this on the Configuration->Shop Parameters page to make it work. There should be an option labeled "Newsletter Autoresponder" on that page with a drop down list showing all your available autoresponders/lists.
To add a newsletter signup form on your storefront, put the following placeholder code in your catalog.html template:
<!-- AShopnewsletterbox -->
By using the DHTML popup mode of the newsletter module you can make the storefront page ask every new visitor to sign up with your list before they start shopping. The whole page will be greyed out while a signup box shows on top of it. To enable this, put the following code in your storefront template:
<!-- AShopnewsletterform -->
Category List Module To list your product categories you can use the following placeholder code:
<!-- AShopcategories --> <!-- /AShopcategories -->
Note that this code is made up of a start code and an end code in order to let you put example categories between them, which will make it easier when designing your template. The content between the two codes will never be shown when the template is used in AShop.
To create a custom list of categories you can use the following code to get the full category tree as an unordered list:
<!-- AShopcategorieslist --> <!-- /AShopcategorieslist -->
If you are an advanced user who knows your way around PHP code, you can customize the categories list in a couple of ways. You can limit the listing to just one category and its subcategories by using the cattree parameter in your index.php script. It must be set to the category ID of the top category, for example:
// Create standard categories list... if (strpos($template,"<!-- AShopcategories -->") !== false && strpos($template,"<!-- /AShopcategories -->") !== false) { $shop = $currentshop; $layout = 1; $catalog = "index.php"; $cattree = "1"; ob_start(); include "includes/categories.inc.php"; $resulthtml = ob_get_contents(); ob_end_clean(); $template = ashop_parsetags($template,"<!-- AShopcategories -->","<!-- /AShopcategories -->",$resulthtml); }
Which will show category 1 with all its subcategories.
You can also exclude certain categories from the listing by using the exclude parameter, set to a pipe separated list of category IDs to exclude, for example:
$exclude = "1|2";
Which will skip categories 1 and 2 from the list.
Language Selection Module This module will display a drop down list of all available languages.
<!-- AShoplanguages -->
The languages that are available is determined from the list of language modules you have installed on your shop. These can be downloaded separately from the AShop Software website.
Currency Selection Module This module will display a drop down list of currencies which a customer can select from to view the prices in their local currency with automatic currency conversion.
<!-- AShopcurrencies -->
To set the list of currencies that will be shown by this code, you will need to edit the script index.php and locate the following line:
$currencies="usd,cad,aud,eur";
Change the list of three letter currency abbreviations to what you want to use. Note that the currency drop down list will only affect how the price is shown in the shopping cart, not the actual currency used for the payment when a customer places an order, which is always the main currency you have set in your admin panel configuration pages.
Search box This code will show the search box:
<!-- AShopsearchbox -->
Top bar This code will show a horizontal bar with the subtotal field, View Cart and Checkout buttons, and a placeholder for "added to cart" messages:
<!-- AShoptopbar --> <!-- /AShoptopbar -->
Subtotal field: This will show only the subtotal field:
<!-- AShopsubtotal -->
Shopping cart buttons: This code will show the View Cart and Checkout buttons:
<!-- AShopcartbuttons -->
Customer login: This will show the customer profile links:
<!-- AShopcustomerlinks -->
Displaying the product list or search results The most important set of placeholder codes are the following ones:
<!-- AShopstart --> <!-- AShopend -->
They will show the list of products belonging to a category, when you click a category. It will show the search results when you perform a search. When you click the name or image of a product, it will show the product details page, if one has been setup.
RSS news feed: AShop uses the free Simple Pie RSS interpreter script to display a list of links determined by an RSS feed. This can be used to show the latest news in your industry from a blog or online newspaper, but the default use in AShop is to show all links you have created in the Manage Pages area of your admin panel. A set of example links are provided when you install AShop, but these can be replaced or removed if you wish. To show the RSS feed, use the following placeholder code:
<!-- AShopnews --> <!-- /AShopnews -->
If you want to show a different RSS feed than the AShop links, you can replace the RSS URL on the page Configuration->Shop Parameters in your admin panel. This option, which is labeled News Feed, can be found in the section labeled Catalog Options.
Note that the Simple Pie script caches its content for improved performance, which means that any change you make to the RSS news content in your shop could take up to 15 minutes to come into effect.
Breadcrumbs and directory: If you wish to make the currently selected category perfectly clear to the customer, you can display it as a breadcrumb, where any categories above the current one are also included with links to go back to those parent categories. This can be done by using the following code:
<!-- AShopbreadcrumbs --> <!-- /AShopbreadcrumbs -->
This works well together with the directory view of the shopping cart product categories, which can be shown with this code:
<!-- AShopdirectory --> <!-- /AShopdirectory -->
Shopping mall: If you are using the paid version of AShop, called AShop V, which includes a multi vendor shopping mall, you can use the following code to display a list of all shopping mall shops:
<!-- AShopmembers --> |