If you use the Starter version, or if you prefer a PHP file, you can also create our templates via files. In this article you will find some explanations.
Standard template
It is best to start from an existing template and adjust it. This is how a complete template class looks like:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
class atkp_default_template_base { public function __construct() { } public function get_header() { return ''; } public function get_detail_header() { return ''; } public function get_body_header() { return ''; } public function get_detail() { return ''; } public function get_body_footer() { return ''; } public function get_detail_footer() { return ''; } public function get_footer() { return ''; } public function get_hidedisclaimer() { return null; } public function get_templatetype() { return null; } public function get_includemainoffer() { return null; } public function get_maxoffercount() { return null; } public function get_customdisclaimer() { return null; } } |
Link functions and template fields
Details about the individual fields can be found in this article.
Functions in Detail
Function | Description |
get_header | Delivers HTML back. |
get_detail_header | Delivers HTML back. |
get_body_header | Delivers HTML back. |
get_detail | Delivers HTML back. |
get_body_footer | Delivers HTML back. |
get_detail_footer | Delivers HTML back. |
get_footer | Delivers HTML back. |
get_hidedisclaimer | Either delivers zero back, then the default or a Boolean (true/false) will be used. |
get_templatetype | Either delivers zero back (then the product template will be used) or an integer.
1 = Product template, 2 = offer template, 3 = image gallery |
get_includemainoffer | Either delivers zero back, then the default or a Boolean (true/false) will be used. |
get_maxoffercount | Either delivers zero back, then the default or an integer will be used. |
get_customdisclaimer | Either delivers zero back. On zero, the disclaimer from the settings will be used. With this, the text for the disclaimer can be overriden. |