Understanding Avactis Tags

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

Avactis Shopping Cart is designed to easily integrate an online store into an existing website,no matter how complex the site might be. Using the special tags mechanism you are able to organize previously entered information on the online storefront just the way you want.

Avactis tags are php functions which display product attributes and even entire blocks of an online storefront.

For example, you can display the product name for product with ID=7 by including the tag <?php ProductName(7); ?> on any website page; the name of the product will then appear onthe page (No programming skills are necessary!).

If you include the tag <?php NavigationBar(); ?> , the Navigation Bar block will be displayed on the page (Navigation Bar is an online storefront component that lets you navigate between the categories of a catalog).

Using this method for displaying product attributes and online storefront components (also called store blocks) you can easily customize the appearance of your storefront to any design. Product descriptions and attributes (text, images, etc) can be rendered in any font, color or size and can be placed anywhere on the site.

Ecommerce storefront components can be placed in any location and in any arrangement you like. In addition, you can use templates (located in a special folder) to change the design of any internet storefront component.

NOTE:The first line of any php page where Avactis tags are present must contain the following call to the shopping cart 
software initializer specifying the absolute software installation path: <?php include('init.php'); ?>

Avactis tags are divided into three groups:

  • Info Tags display pieces of information about various online store components, e.g.

product or category name.

  • Store Block Tags display large portions of online store webpages, using Info Tags and templates
  • Local Tags are used only inside templates and are auxiliary tags. They are not listed in the library.

Writing the Tags

Throughout this manual, all tags are written in the largest possible form: <?php SomeTag();?>. This notation is supported by all servers. You will most likely achieve equal results writing the tags in a short form: <?SomeTag()?>. However, availability of this short form depends on hosting server setup: some servers disallow it.

Getting Avactis Tag Values

You can prepend any Avactis tag with get or getVal prefix to get the tag value instead of displaying it.

  • getSomeTag() returns a formatted value (the one that would be output), while getValSomeTag() returns a bare value as-is.

Example: If ProductSalePrice() tag outputs "$10.00", then:

  • getProductSalePrice() function returns (doesn't output!) "$10.00" and this string value can

be used in an expression:

<?php if( getProductSalePrice()=='$0.00' ) echo( 'FREE!!!' ); ?>
  • getValProductSalePrice() function returns "10" (unformatted value), and it can be used as a

number in an expression:

<?php if( getValProductListPrice() > 0 ) echo( 'You save: $'.( getValProductListPrice));?>