Storefront Templates as Extensions
AbanteCart storefront templates are set per store and consist of number of files. Storefront default template is located in /storefront/view/default/ directory that includes all other components for the template.
These template files are located in /storefront/view/default/template directory
It is recommended that all new templates to AbanteCart developed and added as extensions. This will allow seamless upgrade to future versions of abantecart.
When develop template as extension you simply override any existing default template files in extension or add new once.
Blocks and layout
AbanteCart offers a lot of flexibility to develop different layouts for pages with set collection of blocks assigned per layout per page. Important to note that layout system is only used in pages for storefront. Responses and Control Panel pages do not utilize layout system. Each layout is linked to one template and one or multiple pages. Default layout is loaded if no other layout is found linked to given page.
Below diagrams demonstrate how page, layout and blocks are related to each other:
Why do you need layout for your extension?
Most of extensions of features add to AbanteCart will require display of information. This information might need to be shown in particular part of the page. This can be controlled with using a block to show information. This block can be set to needed part of the page with setting it in layout manager. The steps are the following: Add new block to layout manger, Add new block to layout. If layout is not known, user needs to be informed of the block and directed to layout manager in control panel to enable this block there it is desired.
Layout and blocks can be loaded with one XML files that will create all the database entries for the layout and block. There is a function loadXML() that is available in ALayoutManager class. This function can be called or if you